[R] RMark error: only 0's may be mixed with negative subscripts

Umesh Srinivasan umesh.srinivasan at gmail.com
Mon Nov 8 08:03:46 CET 2010


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"


More information about the R-help mailing list