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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Gorsuch
> ### Title: Example data set from Gorsuch (1997) for an example factor
> ###   extension.
> ### Aliases: Gorsuch
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data(Gorsuch)
> 
> Ro <- Gorsuch[1:6,1:6]
> Roe <- Gorsuch[1:6,7:10]
> fo <- fa(Ro,2,rotate="none")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
psych
 --- call from context --- 
smc(r, covar = covar)
 --- call from argument --- 
if (class(R.inv) == as.character("try-error")) {
    smc <- rep(1, p)
    message("In smc, the correlation matrix was not invertible, smc's returned as 1s")
} else {
    smc <- 1 - 1/diag(R.inv)
}
 --- R stacktrace ---
where 1: smc(r, covar = covar)
where 2: fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, 
    scores = scores, residuals = residuals, SMC = SMC, covar = covar, 
    missing = missing, impute = impute, min.err = min.err, max.iter = max.iter, 
    symmetric = symmetric, warnings = warnings, fm = fm, alpha = alpha, 
    oblique.scores = oblique.scores, np.obs = np.obs, use = use, 
    cor = cor, correct = correct, weight = weight, ... = ...)
where 3: fa(Ro, 2, rotate = "none")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (R, covar = FALSE) 
{
    failed = FALSE
    wcc <- maxr <- NULL
    p <- dim(R)[2]
    if (is.null(colnames(R))) 
        colnames(R) <- paste0("V", 1:p)
    smc.all <- rep(NA, p)
    names(smc.all) <- colnames(R)
    if (dim(R)[1] != p) {
        if (covar) {
            C <- cov(R, use = "pairwise")
            vari <- diag(C)
            R <- cov2cor(C)
        }
        else {
            R <- cor(R, use = "pairwise")
        }
    }
    else {
        vari <- diag(R)
        if (!is.matrix(R)) 
            R <- as.matrix(R)
        R <- cov2cor(R)
    }
    tempR <- NULL
    if (any(is.na(R))) {
        bad <- TRUE
        tempR <- R
        vr <- diag(tempR)
        diag(tempR) <- 0
        maxr <- apply(tempR, 2, function(x) max(abs(x), na.rm = TRUE))
        diag(tempR) <- vr
        wcl <- NULL
        while (bad) {
            wc <- table(which(is.na(tempR), arr.ind = TRUE))
            wcl <- c(wcl, as.numeric(names(which(wc == max(wc)))))
            tempR <- R[-wcl, -wcl]
            if (any(is.na(tempR))) {
                bad <- TRUE
            }
            else {
                bad <- FALSE
            }
        }
        warning("Missing values (NAs) in the correlation matrix do not allow for SMC's to be found for all variables.  \nI will try to estimate SMCs for those variables by their non-NA  correlations.")
        cat("\nSMC(s) for variables ", colnames(R)[wcl], "were replaced (if possible) with smcs based upon their  (its) non-NA correlations\n")
        wc <- (which(is.na(R[, wcl]), arr.ind = TRUE))
        if (is.null(dim(wc))) {
            wcc <- as.numeric(names(table(wc)))
        }
        else {
            wcc <- as.numeric(names(table(wc[, 1])))
        }
        tempR <- R[-wcc, -wcc]
        R <- R[-wcl, -wcl]
    }
    if (!covar) {
        R <- cor.smooth(R)
    }
    R.inv <- try(solve(R), TRUE)
    if (class(R.inv) == as.character("try-error")) {
        smc <- rep(1, p)
        message("In smc, the correlation matrix was not invertible, smc's returned as 1s")
    }
    else {
        smc <- 1 - 1/diag(R.inv)
    }
    names(smc) <- colnames(R)
    if (!is.null(tempR)) {
        R.na.inv <- try(solve(tempR), TRUE)
        if (class(R.na.inv) == as.character("try-error")) {
            smc.na <- rep(1, p)
            message("Oh bother, in smc, the correlation matrix of the adjusted part was not invertible, smc's returned as 1s")
        }
        else {
            smc.na <- 1 - 1/diag(R.na.inv)
        }
    }
    else {
        smc.na <- smc
    }
    if (all(is.na(smc))) {
        message("Something is seriously wrong the correlation matrix.\nIn smc, smcs were set to 1.0")
        smc[is.na(smc)] <- 1
    }
    if (max(smc, na.rm = TRUE) > 1) {
        message("In smc, smcs > 1 were set to 1.0")
        smc[smc > 1] <- 1
    }
    if (min(smc, na.rm = TRUE) < 0) {
        message("In smc, smcs < 0 were set to .0")
        smc[smc < 0] <- 0
    }
    smc.all[names(smc.all) %in% names(smc)] <- smc
    if (!is.null(wcc)) {
        smc.all[wcl] <- smc.na[names(smc.all[wcl])]
    }
    smc <- smc.all
    if (!is.null(maxr)) {
        if (any(is.na(smc))) {
            warning("The SMCs with NA values were replaced by their maximum correlation.")
            cat("\nSMC(s) for variables ", names(smc)[is.na(smc)], 
                "were replaced with their maximum correlation \n")
        }
        smc[is.na(smc)] <- maxr[is.na(smc)]
    }
    if (covar) {
        smc <- smc * vari
    }
    return(smc)
}
<bytecode: 0x1a56f58>
<environment: namespace:psych>
 --- function search by body ---
Function smc in namespace psych has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1