Roberto,
I think the following expression is incorrect:
col = colours[findInterval(gino, levels(gino), all.inside = FALSE)]
It should probably just be colours[gino]. You can test that by typing:
data.frame(gino, colours[findInterval(gino, levels(gino), all.inside =
FALSE)], colours[gino])
Dear All,
I'm having trouble mapping the levels of a factor.
This is the code I have as of now. The legend works fine (suggesting that
item "colours" is correct), but not the map!
gino = factor(data_abs1$Ethnic.Dominance, labels = c(" French", " German", "
Italian", " Portuguese", " Spanish",