Hello,
I am working on a multi-session data set where I have gotten 2 of the sessions to run (simple models, evaluating detection functions, g0). However, the first session causes Rstudio to abort the session. Thus, I ran the code in the R GUI and received this message.
Error in row(object) :
a matrix-like object is required as argument to 'row'
I also tried importing just that session and running as a single session, and receive the same error. I used the make.capt hist to form the data design, and I assumed if there were any duplicates (which seems to make sense for a row matrix error?) in raw data, they would have been removed in this step (maybe bad assumption?). Am I missing something, or is there something wrong somewhere in my data? If it is a data error, what might the error arise from? The data-set is fairly large for this session (5944 captures), if that matters.
Attached was the code I used to do such:
#Read trap files from all sessions
alltraps<- read.traps(file = c("traps_session1.txt", "traps_session2.txt", "traps_session3.txt"), detector = "multi", binary.usage = TRUE, covnames = c("pland","lpi","mpa","feeder"))
# Get a summary from trap files
summary(alltraps)
#Read in captures file
allcaps<-read.delim(file = "all_caps16_18.txt")
allcaps$session<-as.factor(allcaps$session)
allcaps
bobCH<-make.capthist(captures = allcaps, traps = alltraps)
summary(bobCH)
#2016 Model Attempts
model.NEGEX.2016<- secr.fit(bobCH$`2016`, detectfn = "EX", trace=F, buffer=800)
model.HR.2016 <- secr.fit(bobCH$`2016`, trace=F, detectfn= "HR", buffer=800)
model.HN.2016<-secr.fit(bobCH$`2016`, trace=F, detectfn= "HN", buffer=800)
Best Regards,
Brad