SPACECAP {secr} | R Documentation |
Data in a single-session secr capthist
object may be written
directly to the ‘csv’ format used by SPACECAP, a package
for Bayesian spatially explicit capture–recapture (Singh et
al. 2010). Data in csv format may also be read to construct a
capthist
object for analysis in secr.
write.SPACECAP(object, mask = NULL, buffer = 100, ndec = 2, filestem = "") read.SPACECAP(AC, TD, detector = "proximity", session = "1")
object |
|
mask |
|
buffer |
width of buffer in metres to use when creating a mask if none is specified |
ndec |
number of digits after decimal point for coordinates of mask on output |
filestem |
character value used to form names of output files |
AC |
character value giving name of ‘animal capture’ .csv file |
TD |
character value giving name of ‘trap deployment’ .csv file |
detector |
detector type (‘proximity’ or ‘count’) |
session |
character value to use as session name |
If successful, write.SPACECAP
creates three output files with names
ending in ‘AC.csv’,‘TD.csv’ and ‘SS.csv’. These are respectively
the ‘Animal Capture’, ‘Trap Deployment’ and ‘State-Space’ files
required by SPACECAP.
write.SPACECAP
is used for its side effect of writing the
required csv files.
read.SPACECAP
returns a capthist
object.
State-space csv files may be imported with read.mask
.
Gopalaswamy, A.M., Royle, J.A., Hines, J.E., Singh, P., Jathanna, D., Kumar, N.S. and Karanth, K.U. (2012) Program SPACECAP: software for estimating animal density using spatially explicit capture–recapture models. Methods in Ecology and Evolution 3, 1067–1072.
Singh, P., Gopalaswamy, A. M., Royle, A. J., Kumar, N. S. and Karanth, K. U. (2010) SPACECAP: A program to estimate animal abundance and density using Bayesian spatially explicit capture-recapture models. Version 1.0. Wildlife Conservation Society - India Program, Centre for Wildlife Studies, Bangalore, India.
## Not run: ## coerce data to proximity detector type for export demo <- reduce(captdata, output = "proximity") write.SPACECAP (demo, filestem = "demo") ## now read back the data just exported... temp <- read.SPACECAP ("demoAC.csv", "demoTD.csv") temp <- reduce(temp, output = "multi") summary (temp) summary (captdata) ## should match exactly identical(summary(temp), summary(captdata)) ## End(Not run)