[R] maps and lattice

From: Jon Loehrke <jloehrke_at_umassd.edu>
Date: Tue, 5 Feb 2008 17:29:53 -0500


Is it possible to place maps onto lattice plots?

With basic plotting you can add a map to a plot

library(lattice)
long<-c(-69.2, -69.5, -70.1, -70.3)
lat<-c(41, 41.5, 43.2, 42.8)
plot(long, lat)
map('state', c("massachusetts"),add=TRUE)

but is it possible with lattice?

library(lattice)
factor<-c(1,1,2,2)
xyplot(lat~long|fact)
...now what?

I have looked at panel and found through google an extravagant shape file export/import to R.
Is there a simpler fix?

Thank you very much for your help.

Jon

School for Marine Science and Technology UMASS-Dartmouth

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 05 Feb 2008 - 22:32:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 10:30:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive