An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20100127/211a75ee/attachment.pl>
scatter plot of coordinates
7 messages · Julia Tchernova, Abraham de Alba A., Christian Parker +4 more
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20100127/0673aff7/attachment.pl>
Julia,
## Lets say that you read your data in and called it x
x<-read.csv("mydata.csv")
## and that dataset had 3 columns in it; date, lat and long
plot(lat~long,x)
## or
plot(x$lat~x$long)
## or
plot(x$long, x$lat)
## for more help with the plot function (additional arguments and the
like) enter
?plot
-Chris
Abraham de Alba A. wrote:
Please elaborate Julia, I gather you have 3 columns, data, lat, long ? the easiest is a GIS, say Arcview but don't know what you are after, a geostatistical program would also do, say GS+ Abraham de Alba Avila Terrestrial Plant Ecology INIFAP-Ags Ap. postal 20, Pabell?n Arteaga, 20660 Aguascalientes, MEXICO SKYPE: adealba55 Tel: (465) 95-801-67, & 801-86 ext. 126, FAX ext 102 alternate: dealba.abraham at inifap.gob.mx cel: 449-157-7070
________________________________
From: Julia Tchernova <tchernova at npolar.no>
To: "r-sig-ecology at r-project.org" <r-sig-ecology at r-project.org>
Sent: Wed, January 27, 2010 3:28:37 AM
Subject: [R-sig-eco] scatter plot of coordinates
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?
[[elided Yahoo spam]]
Thank you
Julia
[[alternative HTML version deleted]]
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
[[alternative HTML version deleted]]
------------------------------------------------------------------------
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Hi Julia, I have found that the easiest way to display geographic data in R is to use a projected coordinate system (like Universal Transverse Mercator). You can then use plot (x,y) to display a scatterplot of your points. The resulting map isn't pretty, but it lets you visualize the data. The following packages have limited cartographic and map projection capabilities: maps, mapproj, maptools Also, the GIS program GRASS is free and quite functional. http://grass.osgeo.org/ Tammy
On Wed, Jan 27, 2010 at 2:28 AM, Julia Tchernova <tchernova at npolar.no> wrote:
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-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Tammy L. Wilson Doctoral Candidate Department of Wildland Resources Utah State University 5230 Old Main Hill Logan, UT 84322-5230 t.w at aggiemail.usu.edu 435.797.3892
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20100127/f82bfb4e/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20100127/f7a19a89/attachment.pl>
On Wed, 2010-01-27 at 10:28 +0100, Julia Tchernova wrote:
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
The spatial stack of software will probably be useful here if you need
to think about projections etc. Others have suggested something suitable
for simple graphs but for anything even a bit more advanced, the spatial
software will be helpful.
For example:
require(sp)
dat <- data.frame(X = rnorm(3), lat = c(20,30,40), lon = c(10,20,30))
coordinates(dat) <- c("lon","lat")
plot(dat)
box()
axis(1)
axis(2)
## or
##spplot(dat)
HTH
G
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%