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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: mxSE
> ### Title: Compute standard errors in OpenMx
> ### Aliases: mxSE
> 
> ### ** Examples
> 
> library(OpenMx)
> data(demoOneFactor)
> # ===============================
> # = Make and run a 1-factor CFA =
> # ===============================
> 
> latents  = c("G") # the latent factor
> manifests = names(demoOneFactor) # manifest variables to be modeled
> # ===========================
> # = Make and run the model! =
> # ===========================
> m1 <- mxModel("One Factor", type = "RAM", 
+ 	manifestVars = manifests, latentVars = latents, 
+ 	mxPath(from = latents, to = manifests, labels=paste0('lambda', 1:5)),
+ 	mxPath(from = manifests, arrows = 2),
+ 	mxPath(from = latents, arrows = 2, free = FALSE, values = 1),
+ 	mxData(cov(demoOneFactor), type = "cov", numObs = 500)
+ )
> m1 = mxRun(m1)
Running One Factor with 10 parameters
> mxSE(lambda5, model = m1)
Treating first argument as an expression
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
OpenMx
 --- call from context --- 
mxSE(lambda5, model = m1)
 --- call from argument --- 
if (class(zoutMat) %in% "try-error") {
    stop(paste0("Couldn't evaluate expression ", omxQuotes(x), 
        ". Might help to check if it works in mxEval.\n", "Recall also that elements of submodels are addressed as submodelName.objectName\n", 
        "For example, to refer to an object called 'bob' in submodel 'sub1', you would say 'sub1.bob'."))
}
 --- R stacktrace ---
where 1: mxSE(lambda5, model = m1)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, model, details = FALSE, cov, forceName = FALSE, 
    silent = FALSE, ..., defvar.row = as.integer(NA), data = "data") 
{
    if (length(model@output) > 0 && missing(cov)) {
        ParamsCov <- try(vcov(model))
        if (is(ParamsCov, "try-error")) {
            msg <- "Model does not have a reasonable vcov matrix or standard errors."
            stop(msg)
        }
    }
    else if (missing(cov)) {
        stop("Model does not have output and 'cov' argument is missing.  I'm a doctor, not a bricklayer!\nWas this model run with mxRun?")
    }
    else {
        ParamsCov <- cov
        if (is.null(dimnames(ParamsCov))) {
            if (length(paramnames) == nrow(ParamsCov)) {
                dimnames(ParamsCov) <- list(paramnames, paramnames)
            }
            else {
                stop(paste0("dimnames of user-supplied parameter covariance matrix are null\nand the number of rows (", 
                  nrow(ParamsCov), ") do not match the number of free parameters (", 
                  length(paramnames), ")."))
            }
        }
    }
    isCallEtc <- any(c("call", "language", "MxAlgebraFormula") %in% 
        is(match.call()$x))
    ex <- try(eval(x), silent = TRUE)
    isChar <- !("try-error" %in% is(ex)) && is.character(ex)
    if (isCallEtc && !forceName && !isChar) {
        if (!silent) {
            message("Treating first argument as an expression")
        }
        xalg <- mxAlgebraFromString(Reduce(paste, deparse(match.call()$x)), 
            name = "onTheFlyAlgebra")
        x <- "onTheFlyAlgebra"
        model <- mxModel(model, xalg)
    }
    else if ("character" %in% is(x) && !isCallEtc) {
        if (!silent) {
            message("Treating first argument as a character")
        }
        xalg <- mxAlgebraFromString(Reduce(paste, match.call()$x), 
            name = "onTheFlyAlgebra")
        x <- "onTheFlyAlgebra"
        model <- mxModel(model, xalg)
    }
    else if (isChar) {
        if (!silent) {
            message("Treating first argument as an object that stores a character")
        }
        xalg <- mxAlgebraFromString(ex, name = "onTheFlyAlgebra")
        x <- "onTheFlyAlgebra"
        model <- mxModel(model, xalg)
    }
    else {
        stop("Please, sir.  'x' must be either the name of an entity in the model, or an expression for an MxAlgebra.")
    }
    freeparams <- omxGetParameters(model)
    paramnames <- names(freeparams)
    zoutMat <- try(mxEvalByName(x, model, compute = TRUE), silent = silent)
    if (class(zoutMat) %in% "try-error") {
        stop(paste0("Couldn't evaluate expression ", omxQuotes(x), 
            ". Might help to check if it works in mxEval.\n", 
            "Recall also that elements of submodels are addressed as submodelName.objectName\n", 
            "For example, to refer to an object called 'bob' in submodel 'sub1', you would say 'sub1.bob'."))
    }
    covParam <- ParamsCov
    jModel <- mxModel(model, mxComputeJacobian(of = x, defvar.row = defvar.row, 
        data = data))
    jModel <- mxRun(jModel, silent = TRUE)
    jacTrans <- jModel$compute$output$jacobian
    covSparam <- jacTrans %*% covParam %*% t(jacTrans)
    if (any(diag(covSparam) < 0) || any(is.na(diag(covSparam)))) {
        warning("Some diagonal elements of the repeated-sampling covariance matrix of the point estimates are less than zero or NA.\nI know, right? Set details=TRUE and check the 'Cov' element of this object.")
    }
    SEs <- suppressWarnings(sqrt(diag(covSparam)))
    SEsMat <- matrix(SEs, nrow = nrow(zoutMat), ncol = ncol(zoutMat))
    if (details == TRUE) {
        return(list(SE = SEsMat, Cov = covSparam))
    }
    else {
        return(SEsMat)
    }
}
<bytecode: 0x5561e4ee84c8>
<environment: namespace:OpenMx>
 --- function search by body ---
Function mxSE in namespace OpenMx has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1