Skip to content

Broken conversion from sp to spatstat ppp

2 messages · d.g.rossiter at utwente.nl, Edzer Pebesma

#
Since upgrading to R 3.0.1 and the latest version of packages sp 1.0.9, gstat 1.0.16, spatstat 1.31-13 the following conversion no longer works:
Error message:

Error in as(ds, "ppp") : 
  no method or default for coercing "SpatialPointsDataFrame" to "ppp"

Trying another way:

?
Gives a different error message:

Error in as.ppp.default(ds) : Can't interpret X as a point pattern

But I suppose these are at root the same problem.

I can get around this with:
[1] "owin"
window: rectangle = [178605, 181390] x [329714, 333611] units
So it seems the conversion routine should be easy to implement or adjust to whatever has changed in R 3.0.

D G Rossiter
Senior University Lecturer
Faculty of Geoinformation and Earth   Observation Science
Universiteit Twente.
Enschede (NL)
#
David, iirc these conversion methods are in package maptools.
On 06/18/2013 08:40 AM, d.g.rossiter at utwente.nl wrote: