Hi,

I have been running occupancy models for my masters thesis, originally I was working in Program PRESENCE applying a 2-step approach to 2-species occupancy modeling. After finishing my analysis this week I realized I had to make a major revision to my occurrence data after I detected an error (introduced by the pivot table I used to compile the occurrences). This error meant I had to redo my whole analysis (that I've been working on for days if not weeks) after fixing the error in the data. However, the thought of manually re-inputting the models for all 6 analyses (local-scale & landscape-scale) sounded way too daunting in Program PRESENCE as I had (collectively) ran ~200+ models between all 6 analyses (single-species mods for both species and 2-species models times 2 for local-scale covs. and landscape scale covs.) so I thought about trying to re-run my analyses in RPresence to increase efficiency in inputting the models.

After finding the package documentation and writing some script, I got the constant models to run fine as well as the models with a covariate effect on detection. I also had success running 2 models with site covariate effects on occupancy. However, when it came to trying to run any of the models with sample covariates (survcovs), same ones I used in models with cov. effects on detection, I got the error message:

'Error in eval(predvars, data, env) : object 'temp' not found'

This happened for each covariate, I then tried adding 'cov.list= wtoad$survcovs' into the occmod() code to see if that would help and got the same error. Then I tried:

mod9.toad<-occMod(model=list(psi~survcov$temp,p~1),cov.list = wtoad$survcov, data= wtoad, type="so", conf=0.95, outfile='mod9.toad.out', modfitboot=500)

and instead got this error:

Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length

In addition: Warning messages:

1: In getbetas(v[i], psi.dm) : NAs introduced by coercion

2: In sqrt(var) : NaNs produced

I tried pulling the covariates out as a matrix and data frame and calling the object into the model via cov.list= with no luck as a matrix or data frame, and got the same error messages from before. I tried everything I could think of, searched for possible solutions etc. to no avail.

At this point, I'm out of time to try and troubleshoot this and make this work as my thesis is due in a couple weeks. So I decided to abandon this approach that I hoped would be a solution and am back to rerunning all 6 analyses in Program PRESENCE. I really hope I can get this done on time to submit my draft to my committee ASAP. I am posting to see if anyone had any insight as to why this happened and what could have been done if there's a next time.

Lastly, I saw in another forum post that the latest version of RPresence is 4.13.51, however, no matter how many times I installed the package it downloaded v. 4.13.49, has anyone else had an issue with this? The documentation for RPresence is so sparse, I've had no luck tracking down which version of R is needed for the package to run or download the latest one. I even updated R at the beginning since I had an older version.

If you're reading this and got this far, thank you for taking the time. Wishing you a better week than I've been having. <3