[R] How to use filled.contour(x,y,z) data for levelplot(z)?

From: Edzer J. Pebesma <e.pebesma_at_geog.uu.nl>
Date: Tue 10 Jan 2006 - 03:03:42 EST


Jan,

libary(lattice)
rownames(zz) <- xx
colnames(zz) <- yy
levelplot(zz)

will not work -- levelplot needs a data frame with zz, xx and yy values next to each other, so read about data.frame(), rep() and as.vector(zz); you will need the each= argument for one of xx or yy.

Sounds like you'd be helped by using package sp, see also http://r-spatial.sourceforge.net/ and look for the graph gallery, function spplot.

--
Edzer

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jan 10 03:09:25 2006

This archive was generated by hypermail 2.1.8 : Tue 10 Jan 2006 - 06:24:08 EST