Julia, my preferred way of plotting spatial data is to use spatial classes as provided by package(sp).
library(sp) library(maps) pts <- data.frame(lng = seq(10,15,1), lat = seq(45,50,1), date = seq(2000,2005,1)) # coerce to class SpatialPointsDataFrame coordinates(pts) <- ~lng+lat # attribute date is stored in slot data slot(pts, "data") # equivalent to p...@data map(xlim = c(8,17), ylim = c(43,52)) points(df) text(df, labels = d...@data$date) Cheers, Rolond
Hello! I have a dataset with the date and positions - Lat and Long columns How do I make a scatter plot? Do I have to cbind the Lat and Long columns? Any suggestions will be much appreciated! Thank you Julia [[alternative HTML version deleted]] _______________________________________________ R-sig-ecology mailing list r-sig-ecol...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo