[R-sig-Geo] problem with example inverse distance weighted (IDW) interpolation

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Sep 13 13:02:43 CEST 2012



On 09/13/2012 12:43 PM, melita wrote:
> # Error: is.ppp(X) && is.marked(X) is not TRUE

Melita, thanks for bringing this up.

If you first load package gstat, and then load package spatstat, you'll
see the following warning:

Attaching package: ‘spatstat’

The following object(s) are masked from ‘package:gstat’:

    idw

At some stage package spatstat decided to provide inverse distance
weighting and and also call the function to do this idw, but using other
syntax and assumptions about the arguments provided than gstat does.

There's no way for gstat to catch this as it is now, as gstat::idw is
not called at all. A solution would be to not load spatstat, or load
spatstat after gstat (in which case the conflict will point to
spatstat:idw being masked by gstat).

The spatstat package authors could solve this conflict if idw in
spatstat was also defined as an S4 method, as gstat does, rather than as
a function.

Now it comes up, I'm curious why, as spatstat suggests, one would want
to interpolate point pattern marks. As there are no marks where there
are no points, how should the interpolated values be understood? Or is
this intended to be done outside the observation window?
-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list