spatstat / spatstat.geom

Sub-package of spatstat defining spatial data and spatial/geometrical operations
7 stars 4 forks source link

Error in example of `commonGrid()` #13

Closed rubak closed 1 year ago

rubak commented 2 years ago
> library(spatstat.geom)
Loading required package: spatstat.data
spatstat.geom 2.999-999.004
> example(commonGrid)

cmmnGr> if(require(spatstat.random)) {
cmmnGr+    A <- setcov(square(1))
cmmnGr+    G <- density(runifpoint(42), dimyx=16)
cmmnGr+    H <- commonGrid(A, letterR, G)
cmmnGr+    newR <- as.mask(letterR, xy=H)
cmmnGr+    newG <- as.im(G, W=H)
cmmnGr+ }
Loading required package: spatstat.random
spatstat.random 2.999-999.001
Error in density.default(runifpoint(42), dimyx = 16) : 
  argument 'x' must be numeric
In addition: Warning message:
In density.default(runifpoint(42), dimyx = 16) :
 extra argument ‘dimyx’ will be disregarded 
baddstats commented 1 year ago

The method density,ppp was not visible. This is fixed now.