Running examples in 'Rphylopars-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Rphylopars-package
> ### Title: Phylogenetic Comparative Tools for Missing Data and
> ###   Within-Species Variation
> ### Aliases: Rphylopars-package
> ### Keywords: Phylogenetic variance-covariance Ancestral state
> ###   reconstruction Intraspecific variation Within-species variation
> ###   Measurement error Missing data Phylogenetic imputation package
> 
> ### ** Examples
> 
> # simulate data
> sim_data <- simtraits(ntaxa = 15,ntraits = 4,nreps = 3,nmissing = 10)
> 
> # estimate parameters under Brownian motion
> # pheno_error = TRUE assumes intraspecific variation
> # pheno_correlated = FALSE assumes intraspecific variation is not correlated
> # phylo_correlated = TRUE assumed traits are correlated
> 
> PPE <- phylopars(trait_data = sim_data$trait_data,tree = sim_data$tree,
+   pheno_error = TRUE,phylo_correlated = TRUE,pheno_correlated = TRUE)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Rphylopars
 --- call from context --- 
mat_to_pars(phylocov, nvar, as.integer(!phylo_correlated))
 --- call from argument --- 
if (class(M) == "try-error") return(M)
 --- R stacktrace ---
where 1: mat_to_pars(phylocov, nvar, as.integer(!phylo_correlated))
where 2: estim_pars(edge_vec = edge_vec, do_optim = TRUE, phylocov = phylocov, 
    phenocov = phenocov, mu = mu)
where 3: phylopars(trait_data = sim_data$trait_data, tree = sim_data$tree, 
    pheno_error = TRUE, phylo_correlated = TRUE, pheno_correlated = TRUE)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (M, nvar, diag, log_chol = TRUE, mod_chol = TRUE) 
{
    len <- (nvar * nvar - nvar)/2 + nvar
    if (diag == 1) {
        ret <- if (log_chol) 
            log(sqrt(diag(M)))
        else sqrt(diag(M))
        return(ret)
    }
    else {
        M <- try(chol(M), silent = TRUE)
        if (class(M) == "try-error") 
            return(M)
        diag(M) <- if (log_chol) 
            log(diag(M))
        else diag(M)
    }
    if (diag != 1 & nvar > 1) {
        if (log_chol & mod_chol) 
            M[1, 2] <- M[1, 2]/exp(M[1, 1])
    }
    vec_count = 1
    ret <- numeric(len)
    for (j in 1:nvar) {
        for (i in 1:j) {
            ret[vec_count] <- M[i, j]
            vec_count <- vec_count + 1
        }
    }
    ret
}
<bytecode: 0x9c6a830>
<environment: namespace:Rphylopars>
 --- function search by body ---
Function mat_to_pars in namespace Rphylopars has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(M) == "try-error") return(M) : 
  the condition has length > 1
Calls: phylopars -> estim_pars -> mat_to_pars
Execution halted