[R] Inputting Co-ordinates

Don MacQueen macq at llnl.gov
Wed May 8 19:43:55 CEST 2002

Go to http://lib.stat.cmu.edu/R/CRAN/, click on the "Manual" link on 
the left, and get two of the documents:

An Introduction to R (approx. 100 pages, 650kB), based on the former 
"Notes on R", gives an introduction to the language and how to use R 
for doing statistical analysis and graphics.

R Data Import/Export (approx. 30 pages, 270kB) describes the import 
and export facilities available either in R itself or via packages 
which are available from CRAN.

Briefly, put your coordinates in a plain text file (two columns, x 
and y, similar to a spreadsheet), and use the scan() function to read 
them in from the file.


At 4:53 PM +0100 5/8/02, Louise Cox wrote:
>I am trying to input some co-ordinate sets into R of the form x,y by using
>lists.  The command I am using is:
>p1 <- list(x=c(3445,563,646), y=c(234,567,456))
>However the actual co-ordinate sets that I am trying to input have 305
>points each and I think that the program will not accept a command that is
>as long as necessary.  Is this so?  If this is the case can you tell me how
>to read the points in as a table but so that I can call on them as being p1,
>later in the program?
>Many Thanks
>r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list