Hey everyone,
I hope I can explain this well enough over text. I have been working on occupancy data with beaver for awhile now. Currently, I am trying to run this my data as a multi-season model with package unmarked. I have successfully combined both years observations and occupancy variables (site specific), however I am unable to combine my detection variables (survey specific) together. I get the error "incorrect number of dimensions" which does not make any sense as both years have 44 observations of 5 variables per each covariate (10 covariates each).
Here is the code that works for the occupancy data.
site.CovsA(B).mf is to get the number of sites the same.
site.Covs.mf is A+B converged into one.
#site covariates
colnames(site.CovsA.bis)[1] <- "Site"
colnames(site.CovsB.bis)[1] <- "Site"
common <- which(site.CovsA.bis$Site %in% site.CovsB.bis$Site)
site.CovsA.mf <- site.CovsA.bis[c(common),]
common <- which(site.CovsB.bis$Site %in% site.CovsA.bis$Site)
site.CovsB.mf <- site.CovsB.bis[c(common),]
site.Covs.mf <- data.frame(site.CovsA.mf[,c(2:29)],site.CovsB.mf[,c(2:29)])
Here is what site.Covs.mf looks like:
co tm st co.1 tm.1 st.1
Yes No Yes Yes No Yes
Yes No Yes Yes No Yes
Here is the broken code
obs.det <- data.frame(obs.detA.two[,c()],obs.detB.two[,c()])
This is what that data looks like
R1.dh R2.dh R3.dh R4.dh R5.dh
1 YES YES YES YES YES
2 YES YES YES YES YES
and its structure
List of 10
dh :'data.frame': 44 obs. of 5 variables:
.. R1.dh: chr [1:44] "YES" "YES" "YES" "YES" ...
Anyone have any ideas?