[R] Creating a point pattern with spatstat

AMFTom
Mon, 16 Apr 2012 16:24:51 -0000

I have presence/absence data in the following format:

	1	2	3	4	5	6	7	8	9	10	11	12
1	1	1	1	1	1	1	1	1	1	1	1	0
2	1	1	1	1	0	1	1	1	1	1	1	0
3	1	1	1	1	1	1	1	1	1	1	0	1
4	1	1	1	1	1	0	1	1	1	1	0	1
5	1	1	1	1	1	1	1	0	0	1	1	1
6	1	1	1	0	0	1	0	0	1	1	1	1
7	1	1	1	1	0	1	1	0	0	0	1	1
8	1	1	1	1	1	1	1	0	0	0	1	0
9	1	1	1	1	0	0	1	0	0	0	1	1
10	1	1	1	1	1	1	1	0	0	0	0	1
11	1	1	1	1	1	1	1	1	1	0	0	1
12	1	1	1	1	1	0	0	0	1	1	1	1

Which I want to use to create a ppp object in spatstat. I tried:

> X <- as.ppp(Lv2.8, owin(c(0, 12), c(0,12)))

and got

> plot(X)
       0        1
0.000000 1.187939

http://r.789695.n4.nabble.com/file/n4562047/attempt1_ppp.jpg

Which obviously isn't what I'm after. To obtain a simple graphic of
where
points are present on the plot, should I convert the raw data to
non-numerical values?
 Thanks,
Tom

--
View this message in context:
http://r.789695.n4.nabble.com/Creating-a-point-pattern-with-spatstat-tp4562047p4562047.html
Sent from the R help mailing list archive at Nabble.com.