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
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
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
If you change the NA to a value either below or above the range of
values you can then use it.
Below is something that is cobbled together from some code I have.
The datacols argument may be necessary if you want to do something
fancy like I was doing
I used my own colours to see if all
4 matches
Mail list logo