[R] plotting the coordinates versus dates

Paul Hiemstra p.hiemstra at geo.uu.nl
Wed Jan 27 20:59:26 CET 2010


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 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.
>   
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



More information about the R-help mailing list