Dear R users,
I'm currently trying to make level plots of a longitudinal study of the
spatio-temporal spread of a plant disease in a field, but the results of the
color key assignment isn't what I expect.
Here's more info. I recorded the level of a disease on an ordinal scale from
0 (no disease)
Hi,
Thank you Duncan, you showed me how to assign a specific color NA values in
the levelplot. However, I'm still not satisfied with the result of the code
you provided. In the data frame I provided in the first post, there's one
plant with level=0 (at x=8, y=1), and many other plants have level=1
In fact by fiddling with the "at" and "colorkey" options, I was able to get
the result I expected. Now the colors are assigned correctly, as well as the
colorkey. Here's my code:
# see data in the original
data$level[is.na(data$level)] <- 10 # assign a value above the scale to NA
values
levelplo
3 matches
Mail list logo