Running examples in 'gridsample-Ex.R' failed
The error most likely occurred in:

> ### Name: gs_sample
> ### Title: GridSample sampling algorithm
> ### Aliases: gs_sample
> 
> ### ** Examples
> 
> require(raster)
Loading required package: raster
Loading required package: sp
> poprast <- raster(ncols=50,nrows=50,xmx=10,xmn=9,ymn=9,ymx=10,
+ crs=CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"),
+ vals=runif(2500,0,1))
> stratarast <- raster(ncols=50,nrows=50,xmx=10,xmn=9,ymn=9,ymx=10,
+ crs=CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"),
+ vals=c(rep(1,times=1250),rep(2,times=1250)))
> urbanrast <- poprast > 0.9
> gs_sample(population_raster = poprast, 
+           strata_raster = stratarast, 
+           urban_raster = urbanrast, 
+           desired_cell_size = NA,
+           cfg_hh_per_stratum = 20,
+           cfg_hh_per_urban = 2, 
+           cfg_hh_per_rural = 2, 
+           min_pop_per_cell = 0.01,
+           cfg_pop_per_psu = 10,
+           cfg_sample_rururb = FALSE, 
+           cfg_sample_spatial = FALSE, 
+           cfg_sample_spatial_scale = 100,
+           output_path=tempdir(),
+           sample_name="Example")
[1] "Beginning gs_sample() Process:"
[1] "Randomly Stratifying PSU Cell IDs:"
[1] "Processing stratum ID 1 ..."
[1] "Processing stratum ID 2 ..."
[1] "Begin Second Stage Sampling, Growing PSUs:"

     PLEASE NOTE:  The components "delsgs" and "summary" of the
 object returned by deldir() are now DATA FRAMES rather than
 matrices (as they were prior to release 0.0-18).
 See help("deldir").
 
     PLEASE NOTE: The process that deldir() uses for determining
 duplicated points has changed from that used in version
 0.0-9 of this package (and previously). See help("deldir").


Warning in as.SpatialPolygons.tess(from) :
  tile 1 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 2 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 3 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 4 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 5 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 6 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 7 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 8 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 9 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 10 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 11 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 12 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 13 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 14 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 15 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 16 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 17 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 18 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 19 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Warning in as.SpatialPolygons.tess(from) :
  tile 20 defective
 Error : 'is.hole.xypolygon' is not an exported object from 'namespace:spatstat'

Error in x@polygons[[1]] : subscript out of bounds
Calls: gs_sample ... %in% -> match -> coordnames -> coordnames -> coordnames
Execution halted