I ran this exact code with some trial data, and it appeared to work just fine, but when I made a larger dataset, R threw an error:
Error in unmarkedFrameDS(y = as.matrix(ydat), , survey = "line", dist.breaks= c(0,:tlength should be a vector with length(tlength)==nrow(y)
The line of code I was trying to use is:
umf=unmarkedFrameDS(y=as.matrix(ydat),,survey="line",dist.breaks=c(0,100,200,300,400,500,600),tlength=rep(600,5),unitsIn="m")
I had 1 set of 4 transects, 600m long each. When I ran the code, everything went smooth. But when I combined more sets of transects to the data, I got the error above.
I tried changing the tlength=rep(600,5)
to tlength=rep(600,29)
. 28(+1) being the transect count....I think.
Does anyone have any suggestions?