Umesh Srinivasan
2010-Nov-08 07:03 UTC
[R] RMark error: only 0's may be mixed with negative subscripts
Hi all, I have just started using RMark to analyse capture-recapture data. I am trying to analyse a simulated data set using the Robust Design (two primary periods with three secondary sessions in each) to estimate apparent survival. On specifying the time intervals (that tell R about the primary and secondary sampling sessions), this is the error I get:> time.int <- c(0,0,1,0,0) > model <- mark(dat, model = "Robust", time.intervals = time.int)Error in time.intervals[1:(i - 1)] : only 0's may be mixed with negative subscripts This is what I tried to do overall: ################### library(RMark) dat <- import.chdata("/home/umesh/Desktop/capture history.txt") head(dat) time.int <- c(0,0,1,0,0) model <- mark(dat, model = "Robust", time.intervals = time.int) ################### I am attaching the simulated capture histories in the file 'capture history.txt' as well if that will help. Thanks in advance, Umesh Srinivasan National Centre for Biological Sciences Bangalore, India -------------- next part -------------- "ch" "1" "111101" "3" "110111" "4" "011001" "5" "011011" "6" "011010" "7" "101010" "8" "011000" "9" "001111" "10" "110111" "11" "000101" "12" "101101" "13" "010111" "14" "010101" "15" "110011" "16" "111111" "17" "111000" "18" "110000" "20" "110000" "21" "000110" "22" "000011" "24" "000111" "25" "000011" "27" "000101" "28" "000010" "29" "000001" "30" "000111" "31" "000100" "32" "000111" "33" "000010" "34" "000010" "35" "000111"
Jeff Laake
2010-Nov-08 14:35 UTC
[R] RMark error: only 0's may be mixed with negative subscripts
Umesh- You should contact the package maintainer or a SIG with a question about a package. RMark isn't posted on CRAN so it is unlikely most folks will even know about it. There is a support forum for MARK and RMark on the phidot site where you got them. I'll look at your data and problem and will get back to you. I suggest that you subscribe to the phidot forum. Jeff Laake (RMark maintainer) On 11/7/2010 11:03 PM, Umesh Srinivasan wrote:> Hi all, > > I have just started using RMark to analyse capture-recapture data. I am > trying to analyse a simulated data set using the Robust Design (two primary > periods with three secondary sessions in each) to estimate apparent > survival. On specifying the time intervals (that tell R about the primary > and secondary sampling sessions), this is the error I get: > > >> time.int<- c(0,0,1,0,0) >> model<- mark(dat, model = "Robust", time.intervals = time.int) >> > Error in time.intervals[1:(i - 1)] : > only 0's may be mixed with negative subscripts > > This is what I tried to do overall: > > ################### > > library(RMark) > > dat<- import.chdata("/home/umesh/Desktop/capture history.txt") > head(dat) > > time.int<- c(0,0,1,0,0) > model<- mark(dat, model = "Robust", time.intervals = time.int) > > ################### > > I am attaching the simulated capture histories in the file 'capture > history.txt' as well if that will help. > > Thanks in advance, > > Umesh Srinivasan > National Centre for Biological Sciences > Bangalore, India > > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]