Error when trying to use a mask

I have just started my analysis on a 2-4 year data set (depending on region) and for the most part SECR has been working well with all of the errors so far being my own (hence my hesitance to bother y'all with this question).
My models have been running well prior to attempting to use a habitat mask. Now that I have tried to use a mask I am encountering an error that I do not know how to deal with. I tried tracing back the error's location using
to identify where the error was occurring, but I can't make heads nor tails of it since it is pretty deep into the backend code and the objects being called are ones that I am not sure how they relate to what I have entered.
Above is the entirety of the code that I have entered and the resulting error. As sheepish as I will feel I am hoping that I just forgot an argument somewhere. Thank you for any help that can be provided
My models have been running well prior to attempting to use a habitat mask. Now that I have tried to use a mask I am encountering an error that I do not know how to deal with. I tried tracing back the error's location using
- Code: Select all
>
options(error=recover)
> options(show.error.location=TRUE)
to identify where the error was occurring, but I can't make heads nor tails of it since it is pretty deep into the backend code and the objects being called are ones that I am not sure how they relate to what I have entered.
- Code: Select all
> options(error=recover)
> options(show.error.location=TRUE)
> library(secr)
> setwd("C:/Users/jpdraper/OneDrive - Auburn University 1/Master data/SECR data")
> MRBCH<-read.capthist('MRBcaptsub1415.txt', c('MRB2014.txt', 'MRB2015.txt'), detector = "proximity", fmt=c("trapID"))
No errors found :-)
> library(maptools)
> library(rgeos)
> setwd("C:/Users/jpdraper/OneDrive - Auburn University 1/Master data/mapping")
> MRBmaskin<-readShapePoly('MRB_mask_poly')
> MRBmask<-make.mask(traps(MRBCH), buffer=100, type="polybuffer", poly = MRBmaskin, poly.habitat = TRUE, spacing=500)
> g.D.S.<-secr.fit(MRBCH, model=g0~1, buffer=7500, trace=FALSE, ncores = 3, mask=MRBmask)
Error in (function (f, p, ..., hessian = FALSE, typsize = rep(1, length(p)), :
missing value in parameter
Above is the entirety of the code that I have entered and the resulting error. As sheepish as I will feel I am hoping that I just forgot an argument somewhere. Thank you for any help that can be provided