[R] plotting the coordinates versus dates
Hello! I have a dataset with the dates and positions - Lat and Long columns How do I make a scatter plot? Do I have to cbind to combine the Lat and Long columns? Any suggestions will be much appreciated! Thank you Julia [[alternative HTML version deleted]] __ R-help@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.
Re: [R] plotting the coordinates versus dates
On 01/27/2010 08:31 PM, Julia Tchernova wrote: Hello! I have a dataset with the dates and positions - Lat and Long columns How do I make a scatter plot? Do I have to cbind to combine the Lat and Long columns? Any suggestions will be much appreciated! Hi Julia, I depends greatly on what you want to plot. Let's assume that you want to plot the dates at the geographical positions (named lat and lon), and that the dates are character strings. plot(lon,lat,main=Dates of the observations, xlab=Longitude,ylab=Latitude,type=n) text(lon,lat,dates) This assumes that you haven't got too many dates, and a fair bit of latitude (and longitude). It should give you an idea of one type of plot. Jim __ R-help@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.
Re: [R] plotting the coordinates versus dates
Julia Tchernova wrote: Hello! I have a dataset with the dates and positions - Lat and Long columns How do I make a scatter plot? Do I have to cbind to combine the Lat and Long columns? Any suggestions will be much appreciated! Thank you Julia [[alternative HTML version deleted]] __ R-help@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. If you cast your data into the spatial classes for R provided by the sp-pacakge, you can easily make nice plots. After installing sp from CRAN: library(sp) data(meuse) meuse summary(meuse) coordinates(meuse) = ~x+y ?coordinates spplot(meuse, zinc) The r-sig-geo mailing list is more suitable for this kind of question. cheers, Paul -- Drs. Paul Hiemstra Department of Physical Geography Faculty of Geosciences University of Utrecht Heidelberglaan 2 P.O. Box 80.115 3508 TC Utrecht Phone: +3130 274 3113 Mon-Tue Phone: +3130 253 5773 Wed-Fri http://intamap.geo.uu.nl/~paul __ R-help@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.