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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: chr.disp.lrt
> ### Title: Character displacement likelihood ratio test
> ### Aliases: chr.disp.lrt
> 
> ### ** Examples
> 
> ## import finch data form Clarke et al. (2017)
> data(finches)
> ## simulate small amount of data 
> ## (example only - many more datasets are required for accuracy)
> param.simulation <- chr.disp.param(finch.tree, n.sim = 100, n.steps=100,
+ max.sigma = 8, max.a = 8, ntraits=1, 
+ allopatry=as.matrix(allopatric.data), mc.cores = 1)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
motmot
 --- call from context --- 
vectortime(allopatry, 9.9e+10, num_tips)
 --- call from argument --- 
if (class(sympatric) == "matrix") {
    sympatric.out = as.vector(sympatric)
}
 --- R stacktrace ---
where 1: vectortime(allopatry, 9.9e+10, num_tips)
where 2: chr.disp.sim(phy = phy, n.steps = n.steps, a = atry[i], sigma = sig[i], 
    ntraits = ntraits, sympatry = sympatry, allopatry = allopatry, 
    trait.lim = trait.lim)
where 3: FUN(X[[i]], ...)
where 4: lapply(X = X, FUN = FUN, ...)
where 5: parallel::mclapply(1:n.sim, mc.cores = mc.cores, function(i) {
    d.out <- chr.disp.sim(phy = phy, n.steps = n.steps, a = atry[i], 
        sigma = sig[i], ntraits = ntraits, sympatry = sympatry, 
        allopatry = allopatry, trait.lim = trait.lim)$tval
    stats.sim <- summary_stats(phy = phy, y = as.matrix(d.out), 
        est.blomberg.k = est.blomberg.k)
    c(sig[i], atry[i], unlist(stats.sim))
})
where 6: chr.disp.param(finch.tree, n.sim = 100, n.steps = 100, max.sigma = 8, 
    max.a = 8, ntraits = 1, allopatry = as.matrix(allopatric.data), 
    mc.cores = 1)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (sympatric, degree, n.tips) 
{
    if (all(is.na(sympatric))) {
        sympatric.out = replicate(n.tips^2, degree)
    }
    else if (class(sympatric) == "matrix") {
        sympatric.out = as.vector(sympatric)
    }
    sympatric.out
}
<bytecode: 0x55a9ab9b2ff0>
<environment: namespace:motmot>
 --- function search by body ---
Function vectortime in namespace motmot has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1