Habitat Mask Polygon

Murray,
I wanted to add a shapefile of my study area (which also included all non-habitat (e.g., roads, bodies of water) to create a new habitat mask. I successfully loaded my shapefile as a polygon into R using readShapeFile, but when I wrote the make.mask code I received an error and I do not know how to proceed. I wanted to know if you can recommend how I should correct this.
Thank You,
Jason
I wanted to add a shapefile of my study area (which also included all non-habitat (e.g., roads, bodies of water) to create a new habitat mask. I successfully loaded my shapefile as a polygon into R using readShapeFile, but when I wrote the make.mask code I received an error and I do not know how to proceed. I wanted to know if you can recommend how I should correct this.
- Code: Select all
NacPoly <- readShapePoly("nac_boundry.shp")
nacmask <- make.mask(traps(BCVCH), type = "trapbuffer", buffer = 1000, spacing = 641.533, nx=64, poly = "NacPoly", poly.habitat=TRUE, keep.poly = TRUE)
Error in FUN(newX[, i], ...) :
NA/NaN/Inf in foreign function call (arg 5)
In addition: Warning message:
In FUN(newX[, i], ...) : NAs introduced by coercion
Thank You,
Jason