[R-sig-Geo] help on Polygon(sp)?

Virgilio Gómez-Rubio v.gomezrubio at imperial.ac.uk
Wed Mar 21 16:58:31 CET 2007


> #errors occurs????????
> env.lab <- Kenv.label(case_pts,control_pts,splancs_poly, nsim=999, seq
> (0,23000,500))
> error:v error in erifyclass(X, "ppp") : argument 'X' is not of class
> 'ppp'
> Q1: Now that khat(splancs) goes fine, why not  Kenv.label(splancs)?
> From the help, it didn't say that it needs the point data set to be
> the class of ppp(spatstat).

The problem is not in Kenv.label() but in rlabel(), which is called from
Kenv.label and that has versions in Splancs and Spatstat. So, if you
loaded Spatstat after Splancs, then you will be using the 'wrong' (non-
Splancs) version. My advice is to load Splancs only and do the analysis.

I think you could use Spatstat as well to get the envelopes of the K-
function (using envelope() ) but it might require a few more lines of



P.S: Is it wise to use variable names with underscore in it?

More information about the R-sig-Geo mailing list