I have this graph created with the code:
mosaicplot(table(Vowel, Jacc$Jacc),
color = blues9,
main = "Japanese Knowledge and Accuracy compared to Vowel Features")
However, I wanted to reorganize the columns so that they would be sorted by long-short pairs instead of by alphabetical. My first attempt at code for it looked like this:
mosaicplot(table(Vowel, Jacc$Jacc),
color = blues9,
main = "Japanese Knowledge and Accuracy compared to Vowel Features",
sort = "long-a", "short-a", "long-i", "short-i", "long-o", "short-o", "long-u", "short-u")
Vowel is a name for what refers to Quality and Length of vowels (short-a, long-a, short-i, long-i, etc etc) within the Jacc data set, and Jacc refers to knowledge of Japanese + accuracy.
the error I get is:
Error in -rev(shade) : invalid argument to unary operator
I asked a professor and got a suggestion to try this code:
mosaicplot(table(Vowel, Jacc$Jacc),
color = blues9,
main = "Japanese Knowledge and Accuracy compared to Vowel Features",
sort = c("long-a", "short-a", "long-i", "short-i", "long-o", "short-o", "long-u", "short-uā))
however now i get a very strange error that, as far as I can tell is due to r studio parsing this as starting with the sort as the head of the command?
+ mosaicplot(table(Vowel, Jacc$Jacc),
+ color = blues9,
+ main = "Japanese Knowledge and Accuracy compared to Vowel Features",
Error: unexpected symbol in:
" color = blues9,
main = "Japanese"
> sort = c("long-a", "short-a", "long-i", "short-i", "long-o", "short-o", "long-u", "short-uā))
Does anyone have clues as to how to fix this?