Running examples in ‘unmarked-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: colext
> ### Title: Fit the dynamic occupancy model of MacKenzie et. al (2003)
> ### Aliases: colext
> ### Keywords: models
> 
> ### ** Examples
> 
> 
> # Fake data
> R <- 4 # number of sites
> J <- 3 # number of secondary sampling occasions
> T <- 2 # number of primary periods
> 
> y <- matrix(c(
+    1,1,0,  0,0,0,
+    0,0,0,  0,0,0,
+    1,1,1,  1,1,0,
+    1,0,1,  0,0,1), nrow=R, ncol=J*T, byrow=TRUE)
> y
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]    1    1    0    0    0    0
[2,]    0    0    0    0    0    0
[3,]    1    1    1    1    1    0
[4,]    1    0    1    0    0    1
> 
> site.covs <- data.frame(x1=1:4, x2=factor(c('A','B','A','B')))
> site.covs
  x1 x2
1  1  A
2  2  B
3  3  A
4  4  B
> 
> yearly.site.covs <- list(
+    year = matrix(c(
+       'year1', 'year2',
+       'year1', 'year2',
+       'year1', 'year2',
+       'year1', 'year2'), nrow=R, ncol=T, byrow=TRUE)
+       )
> yearly.site.covs
$year
     [,1]    [,2]   
[1,] "year1" "year2"
[2,] "year1" "year2"
[3,] "year1" "year2"
[4,] "year1" "year2"

> 
> obs.covs <- list(
+    x4 = matrix(c(
+       -1,0,1,  -1,1,1,
+       -2,0,0,  0,0,2,
+       -3,1,0,  1,1,2,
+       0,0,0,   0,1,-1), nrow=R, ncol=J*T, byrow=TRUE),
+    x5 = matrix(c(
+       'a','b','c',  'a','b','c',
+       'd','b','a',  'd','b','a',
+       'a','a','c',  'd','b','a',
+       'a','b','a',  'd','b','a'), nrow=R, ncol=J*T, byrow=TRUE))
> obs.covs
$x4
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]   -1    0    1   -1    1    1
[2,]   -2    0    0    0    0    2
[3,]   -3    1    0    1    1    2
[4,]    0    0    0    0    1   -1

$x5
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,] "a"  "b"  "c"  "a"  "b"  "c" 
[2,] "d"  "b"  "a"  "d"  "b"  "a" 
[3,] "a"  "a"  "c"  "d"  "b"  "a" 
[4,] "a"  "b"  "a"  "d"  "b"  "a" 

> 
> umf <- unmarkedMultFrame(y=y, siteCovs=site.covs,
+     yearlySiteCovs=yearly.site.covs, obsCovs=obs.covs,
+     numPrimary=2)                  # organize data
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
unmarked
 --- call from context --- 
unmarkedMultFrame(y = y, siteCovs = site.covs, yearlySiteCovs = yearly.site.covs, 
    obsCovs = obs.covs, numPrimary = 2)
 --- call from argument --- 
if (!(class(yearlySiteCovs[[i]]) %in% c("matrix", "data.frame"))) stop("At least one element of yearlySiteCovs is not a matrix or data frame.")
 --- R stacktrace ---
where 1: unmarkedMultFrame(y = y, siteCovs = site.covs, yearlySiteCovs = yearly.site.covs, 
    obsCovs = obs.covs, numPrimary = 2)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (y, siteCovs = NULL, obsCovs = NULL, numPrimary, yearlySiteCovs = NULL) 
{
    J <- ncol(y)
    umf <- unmarkedFrame(y, siteCovs, obsCovs, obsToY = diag(J))
    umf <- as(umf, "unmarkedMultFrame")
    umf@numPrimary <- numPrimary
    if (class(yearlySiteCovs) == "list") {
        yearlySiteVars <- names(yearlySiteCovs)
        for (i in seq(length(yearlySiteVars))) {
            if (!(class(yearlySiteCovs[[i]]) %in% c("matrix", 
                "data.frame"))) 
                stop("At least one element of yearlySiteCovs is not a matrix or data frame.")
            if (ncol(yearlySiteCovs[[i]]) != numPrimary | nrow(yearlySiteCovs[[i]]) != 
                nrow(y)) 
                stop("At least one matrix in yearlySiteCovs has incorrect number of dimensions.")
        }
        yearlySiteCovs <- data.frame(lapply(yearlySiteCovs, function(x) as.vector(t(x))))
    }
    umf@yearlySiteCovs <- yearlySiteCovs
    umf
}
<bytecode: 0x55aad18d16d8>
<environment: namespace:unmarked>
 --- function search by body ---
Function unmarkedMultFrame in namespace unmarked has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1