unmarkedMultFrame: incorrect dimensions

Hey everyone,

I am having issues with the unmarked package. I am trying to code unmarkedMultFrame (y=y, siteCovs=siteCovs, obsCovs=obsCovs, numPrimary=2) but it is not working.

Y and siteCovs both work fine, but the obsCovs (which is survey data, 5 reps) will not bind properly. According to the tutorial, I need to turn my data into a matrix, then put them into a list. However, the list causes my dimensions to change from 44 (like Y and siteCovs) to 2 as it will not differentiate between the two lists.

det.covA <- as.matrix(data.frame(det.covA))
det.covB <- as.matrix(data.frame(det.covB))

beavermf <- unmarkedMultFrame(y, siteCovs=site.cov.2s, obsCovs=list(det.covB,det.covA), numPrimary=2)

Error in FUN(X[[i]], ...) :
At least one element of obsCovs has incorrect number of dimensions.

I've also tried forgoing the list and using data.frame instead but still get an error.

beavermf <- unmarkedMultFrame(y, siteCovs=site.cov.2s, obsCovs=data.frame(det.covB,det.covA), numPrimary=2)

Error in validObject(.Object) :
invalid class “unmarkedFrame” object: obsCovData does not have M*obsNum rows.

I have been unable to find any other way of writing this code. Does anyone else have any thoughts?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.