Occupancy model in RMark, Error in FUN(X[[1L]], ...)

I am a long-time MARK user, some-time R user, and am trying to learn RMark.
I am consistently getting an error ("Error in FUN(X[[1L]], ...) : invalid 'type' (character) of argument") when I try to run Occupancy model with RMark, but I have not seen any postings about this yet.
I recently updated my verisons of R (v. 3.0.0) and MARK (v. 7.0).
Here is example script that I have used leading up to the error. Can anyone, please, advise about what might be the source of this problem?
Thanks, very much! Paul Griffin
I am consistently getting an error ("Error in FUN(X[[1L]], ...) : invalid 'type' (character) of argument") when I try to run Occupancy model with RMark, but I have not seen any postings about this yet.
I recently updated my verisons of R (v. 3.0.0) and MARK (v. 7.0).
Here is example script that I have used leading up to the error. Can anyone, please, advise about what might be the source of this problem?
Thanks, very much! Paul Griffin
- Code: Select all
# Script attempting to run simple Occupancy models for 2-occasions, single-season, single-place.
> library(RMark)
> PAO2009 <- import.chdata("PAO2009_Rmark_Trial_Data.txt", header = TRUE, use.comments = FALSE)
# Confirm that the ch looks good:
> PAO2009 [1:3,]
ch freq Blowdown Light Effort
1 11 1 50 1 4
2 01 1 50 1 4
3 10 1 2 1 4
> PAO.2009.process=process.data(PAO2009, model="Occupancy")
> PAO.2009.ddl=make.design.data(PAO.2009.process)
# Designate simple model structure
> p.dot=list(formula=~1)
> Psi.dot=list(formula=~1)
# create a model
> model.p.dot.Psi.dot <- mark(PAO.2009.process, PAO.2009.ddl,model.parameters=list(p=p.dot, Psi=Psi.dot))
Error in FUN(X[[1L]], ...) : invalid 'type' (character) of argument
# What's the problem? I'm pretty sure that the capture histories are the right type:
> typeof(PAO2009$ch)
[1] "character"
# And all three covariates are integers, for example...
> typeof(PAO2009$Blowdown)
[1] "integer"