[R] levelplot behaviour when "at" cuts the z range

Edzer J. Pebesma e.pebesma at geog.uu.nl
Fri Aug 29 12:22:53 CEST 2003

Consider the following examples:

x = c(1,1,2,2)
y = c(1,2,1,2)
z = 1:4
levelplot(z~x+y,at=c(.5, 1.5, 2.5, 3.5, 4.5)) # correct
levelplot(z~x+y,at=c(.5, 1.5, 2.5))           # ?

The second plot is clearly incorrect. However, I don't know
what correct behaviour is: ignore everything above 2.5 and
issue a warning? Reject at values that do not cover the
data range, and issue an error message? I think I prefer
the second, as it does not hide extremes.

More information about the R-help mailing list