[R-sig-Geo] Reading text files in Spatstat

Don MacQueen macq at llnl.gov
Tue Jul 3 15:59:52 CEST 2007


The help page for as.ppp() explains that in a case like yours (or 
what I assume is yours from your description), you also need to 
supply the W argument.

Try looking at the help page for the ppp() function.

-Don

At 1:13 PM +0100 7/3/07, Taylor, RB wrote:
>Hello all,
>
>I have x,y data with an associated mark. Is there a simple way of
>getting Spatstat to read this data? I have tried putting the x, y data
>in separate columns in Excel and ignoring the marks, saving it as a
>tab-delim text file (called "test"). However the as.ppp function fails
>to convert it into a ppp object.
>
>
>  > test <- read.table("C:/temp/Rtest.txt")
>  > as.ppp(test)
>Error in as.ppp.default(test) : Can't interpret X as a point pattern
>
>
>Perhaps someone can answer my simple question and tell me what I am
>doing wrong?
>
>Thanks,
>Rob
>--
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062




More information about the R-sig-Geo mailing list