[R-sig-Geo] multitype point patterns
GodinA
godina at dal.ca
Mon Oct 17 17:41:56 CEST 2011
Hi all,
I have a multitype point patterns representing 12 different species as
follow:
>marked planar point pattern: 821 points
>multitype, with levels = 88 90 91 92 93 94 96 98 99 100 102 107
>window: rectangle = [-60, -45] x [40, 56] units
> head(as.data.frame(skate.ppp))
x y marks
1 -54.198 55.127 88
2 -51.071 43.015 88
3 -47.050 48.111 88
4 -46.377 47.552 88
5 -46.470 47.274 88
6 -51.301 43.041 88
I would like to add another mark with the number of species found at each
location. I'm sure this is fairly straightforward, but somehow I am
struggling with it! I have been doing the following:
>marks(skate.ppp) <- skate$number
However, when I do so, I am replacing all my previous marks by these new
ones...
> head(as.data.frame(skate.ppp))
x y marks
1 -54.198 55.127 2
2 -51.071 43.015 1
3 -47.050 48.111 2
4 -46.377 47.552 1
5 -46.470 47.274 1
6 -51.301 43.041 4
> skate.ppp
marked planar point pattern: 821 points
marks are numeric, of type ‘double’
window: rectangle = [-60, -45] x [40, 56] units
Thank you very much in advance!
Aurelie
-----
Aurelie Cosandey-Godin
Ph.D. Candidate, Department of Biology
Industrial Graduate Fellow, WWF-Canada
Dalhousie University | Biology Dept. |Halifax, NS, Canada
Email: godina at dal.ca | Web: wormlab.biology.dal.ca
--------------------------------------------------------------------------
Want to learn more about sharks in Atlantic Canada? Visit ShARCC! www.atlanticsharks.org
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/multitype-point-patterns-tp6901052p6901052.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list