Error(s) in re-building vignettes:
  ...
--- re-building ‘intro.Rnw’ using Sweave
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
psych
 --- call from context --- 
smc(C, TRUE)
 --- 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(C, TRUE)
where 2: scoreItems(keys, msq[, 1:75])
where 3: eval(expr, .GlobalEnv)
where 4: eval(expr, .GlobalEnv)
where 5: withVisible(eval(expr, .GlobalEnv))
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 10: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 11: evalFunc(ce, options)
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 14: driver$runcode(drobj, chunk, chunkopts)
where 15: utils::Sweave(...)
where 16: engine$weave(file, quiet = quiet, encoding = enc)
where 17: doTryCatch(return(expr), name, parentenv, handler)
where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 19: tryCatchList(expr, classes, parentenv, handlers)
where 20: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 21: tools:::.buildOneVignette("intro.Rnw", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/psych.Rcheck/vign_test/psych", 
    TRUE, FALSE, "intro", "", "/home/hornik/tmp/scratch/RtmpKzSUg0/file535b71ea66d7.rds")

 --- 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: 0x555a9bba7260>
<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
--- re-building ‘overview.Rnw’ using Sweave
Loading required package: GPArotation
 ----------- 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 at overview.Rnw#459: fa(Thurstone, 3, n.obs = 213)
where 4: eval(expr, .GlobalEnv)
where 5: eval(expr, .GlobalEnv)
where 6: withVisible(eval(expr, .GlobalEnv))
where 7: doTryCatch(return(expr), name, parentenv, handler)
where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 9: tryCatchList(expr, classes, parentenv, handlers)
where 10: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 11: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 12: evalFunc(ce, options)
where 13: tryCatchList(expr, classes, parentenv, handlers)
where 14: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 15: driver$runcode(drobj, chunk, chunkopts)
where 16: utils::Sweave(...)
where 17: engine$weave(file, quiet = quiet, encoding = enc)
where 18: doTryCatch(return(expr), name, parentenv, handler)
where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 20: tryCatchList(expr, classes, parentenv, handlers)
where 21: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 22: tools:::.buildOneVignette("overview.Rnw", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/psych.Rcheck/vign_test/psych", 
    TRUE, FALSE, "overview", "", "/home/hornik/tmp/scratch/RtmpKzSUg0/file535b161b0a39.rds")

 --- 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: 0x559b1ba94950>
<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
--- re-building ‘psych_for_sem.Rnw’ using Sweave
Loading required package: sem
Loading required package: GPArotation
 ----------- 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(model, nfactors, n.obs = n.obs, rotate = "varimax", fm = fm, 
    covar = covar)
where 4: schmid(m, nfactors, fm, digits, rotate = rotate, n.obs = n.obs, 
    Phi = Phi, option = option, covar = covar, ...)
where 5: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip, 
    digits = digits, title = title, sl = sl, labels = labels, 
    plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option, 
    covar = covar, ...)
where 6: omega(bifact, title = "A bifactor model")
where 7: eval(expr, .GlobalEnv)
where 8: eval(expr, .GlobalEnv)
where 9: withVisible(eval(expr, .GlobalEnv))
where 10: doTryCatch(return(expr), name, parentenv, handler)
where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(expr, error = function(e) {
    call <- conditionCall(e)
    if (!is.null(call)) {
        if (identical(call[[1L]], quote(doTryCatch))) 
            call <- sys.call(-4L)
        dcall <- deparse(call)[1L]
        prefix <- paste("Error in", dcall, ": ")
        LONG <- 75L
        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
        if (is.na(w)) 
            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
                type = "b")
        if (w > LONG) 
            prefix <- paste0(prefix, "\n  ")
    }
    else prefix <- "Error : "
    msg <- paste0(prefix, conditionMessage(e), "\n")
    .Internal(seterrmessage(msg[1L]))
    if (!silent && isTRUE(getOption("show.error.messages"))) {
        cat(msg, file = outFile)
        .Internal(printDeferredWarnings())
    }
    invisible(structure(msg, class = "try-error", condition = e))
})
where 14: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 15: evalFunc(ce, options)
where 16: tryCatchList(expr, classes, parentenv, handlers)
where 17: tryCatch(evalFunc(ce, options), finally = {
    cat("\n")
    sink()
})
where 18: driver$runcode(drobj, chunk, chunkopts)
where 19: utils::Sweave(...)
where 20: engine$weave(file, quiet = quiet, encoding = enc)
where 21: doTryCatch(return(expr), name, parentenv, handler)
where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 23: tryCatchList(expr, classes, parentenv, handlers)
where 24: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
}, error = function(e) {
    OK <<- FALSE
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 25: tools:::.buildOneVignette("psych_for_sem.Rnw", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/psych.Rcheck/vign_test/psych", 
    TRUE, FALSE, "psych_for_sem", "", "/home/hornik/tmp/scratch/RtmpKzSUg0/file535b1edb5f48.rds")

 --- 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: 0x5599e8fe21e0>
<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
SUMMARY: processing the following files failed:
  ‘intro.Rnw’ ‘overview.Rnw’ ‘psych_for_sem.Rnw’

Error: Vignette re-building failed.
Execution halted