Error(s) in re-building vignettes:
  ...
--- re-building 'Corr_Cont_System.Rmd' using rmarkdown
Loading required package: SimMultiCorrData

Attaching package: 'SimMultiCorrData'

The following object is masked from 'package:stats':

    poly

Loading required package: SimCorrMix
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
SimRepeat
 --- call from context --- 
checkpar(M, method, error_type, means, vars, skews, skurts, fifths, 
    sixths, Six, mix_pis, mix_mus, mix_sigmas, mix_skews, mix_skurts, 
    mix_fifths, mix_sixths, mix_Six, same.var = same.var, betas.0 = betas.0, 
    corr.x = corr.x, corr.yx = corr.yx, corr.e = corr.e, quiet = TRUE)
 --- call from argument --- 
if (class(same.var) == "matrix") {
    if (ncol(same.var) != 4) 
        stop("same.var should be matrix with 4 columns.")
} else if (class(same.var) == "numeric") {
    if (length(same.var) > ncol(corr.x[[1]][[1]])) 
        stop("same.var should be vector with at most ncol(corr.x[[1]][[1]])\n             elements.")
} else stop("same.var should be vector or matrix.")
 --- R stacktrace ---
where 1: checkpar(M, method, error_type, means, vars, skews, skurts, fifths, 
    sixths, Six, mix_pis, mix_mus, mix_sigmas, mix_skews, mix_skurts, 
    mix_fifths, mix_sixths, mix_Six, same.var = same.var, betas.0 = betas.0, 
    corr.x = corr.x, corr.yx = corr.yx, corr.e = corr.e, quiet = TRUE)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 9: evaluate::evaluate(...)
where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 12: block_exec(params)
where 13: call_block(x)
where 14: process_group.block(group)
where 15: process_group(group)
where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 17: process_file(text, output)
where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 20: vweave_rmarkdown(...)
where 21: engine$weave(file, quiet = quiet, encoding = enc)
where 22: doTryCatch(return(expr), name, parentenv, handler)
where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 24: tryCatchList(expr, classes, parentenv, handlers)
where 25: 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 26: tools:::.buildOneVignette("Corr_Cont_System.Rmd", "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/SimRepeat.Rcheck/vign_test/SimRepeat", 
    TRUE, FALSE, "Corr_Cont_System", "UTF-8", "/tmp/RtmpL6YZga/file61835ebf0164.rds")

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (M = NULL, method = c("Fleishman", "Polynomial"), error_type = c("non_mix", 
    "mix"), means = list(), vars = list(), skews = list(), skurts = list(), 
    fifths = list(), sixths = list(), Six = list(), mix_pis = list(), 
    mix_mus = list(), mix_sigmas = list(), mix_skews = list(), 
    mix_skurts = list(), mix_fifths = list(), mix_sixths = list(), 
    mix_Six = list(), marginal = list(), support = list(), lam = list(), 
    p_zip = list(), pois_eps = list(), size = list(), prob = list(), 
    mu = list(), p_zinb = list(), nb_eps = list(), corr.x = list(), 
    corr.yx = list(), corr.e = NULL, same.var = NULL, subj.var = NULL, 
    int.var = NULL, tint.var = NULL, betas.0 = NULL, betas = list(), 
    betas.subj = list(), betas.int = list(), betas.t = NULL, 
    betas.tint = list(), rand.int = c("none", "non_mix", "mix"), 
    rand.tsl = c("none", "non_mix", "mix"), rand.var = NULL, 
    corr.u = list(), quiet = FALSE) 
{
    if (length(error_type) != 1) 
        stop("Please choose one type of distribution for all of the error terms:\n         mix if all errors have continuous mixture distributions,\n         non_mix if all errors have continuous non-mixture distributions.")
    if (length(method) != 1) 
        stop("Choose a PMT method for the continuous variables.")
    K.cat <- rep(0, M)
    K.pois <- rep(0, M)
    K.nb <- rep(0, M)
    if (length(marginal) > 0) 
        K.cat <- lengths(marginal)
    if (max(K.cat) > 0) {
        if (!all(unlist(lapply(marginal, function(x) unlist(lapply(x, 
            function(y) (sort(y) == y & min(y) > 0 & max(y) < 
                1))))))) 
            stop("Error in given marginal distributions.")
        if (length(support) > 0) {
            if (!all(K.cat %in% lengths(support))) 
                stop("Lengths of support do not match lengths of marginal.")
            k.cat <- unlist(lapply(marginal, function(x) lengths(x) + 
                1))
            k.cat2 <- unlist(lapply(support, function(x) lengths(x)))
            if (!all(mapply(function(x, y) (if (y == 0 | y == 
                x) TRUE else FALSE), k.cat, k.cat2))) 
                stop("Error in given support values.")
        }
    }
    if (length(lam) > 0) 
        K.pois <- lengths(lam)
    if (max(K.pois) > 0) {
        if (sum(sapply(lam, function(x) sum(x < 0)) > 0) > 0) 
            stop("Lambda values cannot be negative.")
        if (class(p_zip) == "numeric" & length(p_zip) == 1 & 
            quiet == FALSE) {
            message("All p_zip values will be set at p_zip.")
        }
        else if (class(p_zip) == "numeric" & length(p_zip) == 
            M & quiet == FALSE) {
            message("All p_zip[[p]] values will be set at p_zip[p].")
        }
        else if (class(p_zip) == "list" & length(p_zip) == M & 
            quiet == FALSE) {
            for (p in 1:M) {
                if (length(p_zip[[p]]) != K.pois[p]) 
                  message(paste("Missing value of p_zip for equation ", 
                    p, " will be set at 0.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All p_zip values will be set at 0.")
        }
        if (class(pois_eps) == "numeric" & length(pois_eps) == 
            1 & quiet == FALSE) {
            message("All pois_eps values will be set at pois_eps.")
        }
        else if (class(pois_eps) == "numeric" & length(pois_eps) == 
            M & quiet == FALSE) {
            message("All pois_eps[[p]] values will be set at pois_eps[p].")
        }
        else if (class(pois_eps) == "list" & length(pois_eps) == 
            M & quiet == FALSE) {
            for (p in 1:M) {
                if (length(pois_eps[[p]]) != K.pois[p]) 
                  message(paste("Missing value of pois_eps for equation ", 
                    p, " will be set at 0.0001.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All pois_eps values will be set at 0.0001.")
        }
    }
    if (length(size) > 0) 
        K.nb <- lengths(size)
    if (max(K.nb) > 0) {
        if (sum(sapply(size, function(x) sum(x < 0)) > 0) > 0) 
            stop("Size values cannot be negative.")
        if (length(prob) > 0) {
            if (sum(sapply(prob, function(x) sum(x < 0)) > 0) > 
                0) 
                stop("Prob values cannot be negative.")
            if (!all(lengths(prob) %in% K.nb)) 
                stop("Check lengths of prob vectors.")
        }
        if (length(mu) > 0) {
            if (sum(sapply(mu, function(x) sum(x < 0)) > 0) > 
                0) 
                stop("mu values cannot be negative.")
            if (!all(lengths(mu) %in% K.nb)) 
                stop("Check lengths of mu vectors.")
        }
        if (class(p_zinb) == "numeric" & length(p_zinb) == 1 & 
            quiet == FALSE) {
            message("All p_zinb values will be set at p_zinb.")
        }
        else if (class(p_zinb) == "numeric" & length(p_zinb) == 
            M & quiet == FALSE) {
            message("All p_zinb[[p]] values will be set at p_zinb[p].")
        }
        else if (class(p_zinb) == "list" & length(p_zinb) == 
            M & quiet == FALSE) {
            for (p in 1:M) {
                if (length(p_zinb[[p]]) != K.nb[p]) 
                  message(paste("Missing value of p_zinb for equation ", 
                    p, " will be set at 0.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All p_zinb values will be set at 0.")
        }
        if (class(nb_eps) == "numeric" & length(nb_eps) == 1 & 
            quiet == FALSE) {
            message("All nb_eps values will be set at nb_eps.")
        }
        else if (class(nb_eps) == "numeric" & length(nb_eps) == 
            M & quiet == FALSE) {
            message("All nb_eps[[p]] values will be set at nb_eps[p].")
        }
        else if (class(nb_eps) == "list" & length(nb_eps) == 
            M & quiet == FALSE) {
            for (p in 1:M) {
                if (length(nb_eps[[p]]) != K.nb[p]) 
                  message(paste("Missing value of nb_eps for equation ", 
                    p, " will be set at 0.0001.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All nb_eps values will be set at 0.0001.")
        }
    }
    if (!(length(means) %in% c(M, 1 + M, 2 * M)) | !(length(vars) %in% 
        c(M, 1 + M, 2 * M))) 
        stop("Each equation must have a continuous error term with means given in\n         means and variances in vars.  Length of means and vars\n         should be M, 1 + M, or 2 * M.")
    M0 <- length(means)
    K.mix <- rep(0, M0)
    K.comp <- rep(0, M0)
    if (length(mix_pis) > 0) {
        if (length(mix_pis) == M0) {
            K.mix <- lengths(mix_pis)
            K.comp <- lengths(lapply(mix_pis, unlist))
        }
        else {
            K.mix <- c(lengths(mix_pis), rep(0, M0 - M))
            K.comp <- c(lengths(lapply(mix_pis, unlist)), rep(0, 
                M0 - M))
        }
    }
    K.cont <- lengths(vars) - K.mix
    if (!all(lengths(means) %in% (K.cont + K.mix))) 
        stop("Lengths of mean vectors should be same as lengths of vars vectors.")
    if (max(K.cont) > 0) {
        if (!all(lengths(skews) %in% K.cont) | !all(lengths(skurts) %in% 
            K.cont)) 
            stop("Lengths of continuous non-mixture lists should equal lengths of\n           vars minus the number of continuous mixture variables.")
        if (method == "Polynomial") {
            if (!all(lengths(fifths) %in% K.cont) | !all(lengths(sixths) %in% 
                K.cont)) 
                stop("Lengths of continuous non-mixture lists should equal lengths of\n             vars minus the number of continuous mixture variables.")
            if (!(length(Six) %in% c(0, M, 1 + M, 2 * M))) 
                stop("Six should be either list() or a list of length M, M + 1,\n             or 2 * M.")
            if (length(Six) != 0) {
                for (i in 1:length(Six)) {
                  if (!(length(Six[[i]]) %in% c(0, K.cont[i]))) 
                    stop("The i-th element of Six should be either NULL or a list of\n                 the same length as the i-th element of sixths.")
                }
            }
        }
    }
    if (length(mix_pis) > 0) {
        if (!all(lengths(mix_mus) %in% K.mix) | !all(lengths(mix_sigmas) %in% 
            K.mix) | !all(lengths(mix_skews) %in% K.mix) | !all(lengths(mix_skurts) %in% 
            K.mix)) 
            stop("Lengths of mixing parameter lists should be equal to the number\n           of mixture variables.")
        if (method == "Polynomial") {
            if (!all(lengths(mix_fifths) %in% K.mix) | !all(lengths(mix_sixths) %in% 
                K.mix)) 
                stop("Lengths of mixing parameter lists should be equal to the number\n             of mixture variables.")
            if (!(length(mix_Six) %in% c(0, M, M + 1, 2 * M))) 
                stop("mix_Six should be either list() or a list of length M, M + 1,\n             or 2 * M.")
            if (length(mix_Six) != 0) {
                for (i in 1:length(mix_Six)) {
                  if (!(length(mix_Six[[i]]) %in% c(0, K.comp[i]))) 
                    stop("The i-th element of mix_Six should be either NULL or a list\n                 of the same length as the i-th element of mix_sixths.")
                }
            }
        }
    }
    if (length(means) %in% c(2 * M, M + 1)) {
        means <- means[1:M]
        vars <- vars[1:M]
    }
    if (length(mix_pis) %in% c(2 * M, M + 1)) 
        mix_pis <- mix_pis[1:M]
    K.mix <- rep(0, M)
    K.comp <- rep(0, M)
    K.error <- rep(0, M)
    if (length(mix_pis) > 0) {
        K.mix <- lengths(mix_pis)
        K.comp <- sapply(lapply(mix_pis, unlist), length)
    }
    K.cont <- lengths(vars) - K.mix
    k.mix <- c(0, cumsum(K.mix))
    if (error_type == "mix") {
        K.error <- sapply(mix_pis, function(x) lengths(x[length(x)]))
        K.x <- K.cont + K.comp - K.error + K.cat + K.pois + K.nb
        K.cont2 <- K.cont
        K.mix2 <- K.mix - 1
    }
    else {
        K.x <- K.cont + K.comp - 1 + K.cat + K.pois + K.nb
        K.cont2 <- K.cont - 1
        K.mix2 <- K.mix
    }
    if (sum(lengths(means) == 0) > 0 | sum(lengths(vars) == 0) > 
        0) 
        stop("Each equation must have a continuous error term with means given in\n         means and variances in vars.")
    if (length(corr.x) > 0) {
        if (length(corr.x) != M) 
            stop("corr.x should be list of length M.")
        if (!all(lengths(corr.x) %in% c(0, M))) 
            stop("corr.x should be list of lists of length M.")
        for (i in 1:M) {
            if (K.x[i] == 0) 
                next
            if (!all(sapply(corr.x[[i]], function(x) if (is.null(x)) 0 else nrow(x)) %in% 
                c(0, K.x[i]))) 
                stop("corr.x[[i]] should be list of matrices with number of rows equal\n             to number of independent variables for equation i.")
            for (j in 1:M) {
                if (K.x[j] == 0) 
                  next
                if (ncol(corr.x[[i]][[j]]) != K.x[j]) 
                  stop("corr.x[[i]][[j]] should be matrix with number of cols equal\n               to number of independent variables for equation j.")
            }
        }
    }
    if (length(corr.yx) > 0) {
        if (length(corr.yx) != M) 
            stop("corr.yx should be a list of length M.")
        if (!all(sapply(corr.yx, function(x) if (is.null(x)) 0 else nrow(x)) %in% 
            c(0, 1))) 
            stop("corr.yx should be a list of matrices with 1 row each.")
        if (!all(sapply(corr.yx, function(x) if (is.null(x)) 0 else ncol(x)) %in% 
            K.x) & !all(sapply(corr.yx, function(x) if (is.null(x)) 0 else ncol(x)) %in% 
            (K.cont2 + K.mix2))) 
            stop("corr.yx should be a list of matrices with 1 row each.\n           The number of columns should either equal the number of non-mixture\n           plus components of mixture variables or the number of non-mixture\n           plus mixture variables.")
    }
    K.r <- rep(0, M)
    if (class(corr.u) == "list" & length(corr.u) > 0) {
        K.r <- sapply(mapply("[", corr.u, lengths(corr.u), SIMPLIFY = FALSE), 
            function(x) if (is.null(x)) 
                0
            else nrow(x[[1]]))
        if (length(corr.u) != M) 
            stop("corr.u should be list of length M.")
        if (!all(lengths(corr.u) %in% c(0, M))) 
            stop("corr.u should be list of lists of length M.")
        for (i in 1:M) {
            if (K.r[i] == 0) 
                next
            if (!all(sapply(corr.u[[i]], function(x) if (is.null(x)) 0 else nrow(x)) %in% 
                c(0, K.r[i]))) 
                stop("corr.u[[i]] should be list of matrices with number of rows equal\n             to number of random effects for equation i.")
            for (j in 1:M) {
                if (K.r[j] == 0) 
                  next
                if (ncol(corr.u[[i]][[j]]) != K.r[j]) 
                  stop("corr.u[[i]][[j]] should be matrix with number of cols equal\n               to number of random effects for equation j.")
            }
        }
    }
    if (max(K.r) > 0) {
        if (length(rand.int) != M & quiet == FALSE) 
            message("The random intercept for all equations will be set at\n              rand.int[1].")
        if (length(rand.tsl) != M & quiet == FALSE) 
            message("The random time slope for all equations will be set at\n              rand.tsl[1].")
        if (!is.null(rand.var)) {
            if (ncol(rand.var) != 2) 
                stop("rand.var should be matrix with 2 columns.")
        }
    }
    if (quiet == FALSE) {
        if (is.null(betas.0)) 
            message("The intercepts will all be set at 0.")
        if (length(betas.0) < M & length(betas.0) > 0) 
            message("The intercepts will all be set at betas.0[1].")
        if (length(corr.yx) == 0 & is.null(betas.t)) 
            message("The time slopes will all be set at 1.")
        if (length(betas.t) < M & length(betas.t) > 0) 
            message("The time slopes will all be set at betas.t[1].")
    }
    if (!is.null(same.var)) {
        if (class(same.var) == "matrix") {
            if (ncol(same.var) != 4) 
                stop("same.var should be matrix with 4 columns.")
        }
        else if (class(same.var) == "numeric") {
            if (length(same.var) > ncol(corr.x[[1]][[1]])) 
                stop("same.var should be vector with at most ncol(corr.x[[1]][[1]])\n             elements.")
        }
        else stop("same.var should be vector or matrix.")
    }
    if (!is.null(subj.var)) {
        if (ncol(subj.var) != 2) 
            stop("subj.var should be matrix with 2 columns.")
    }
    if (!is.null(int.var)) {
        if (ncol(int.var) != 3) 
            stop("int.var should be matrix with 3 columns.")
    }
    if (!is.null(tint.var)) {
        if (ncol(tint.var) != 2) 
            stop("tint.var should be matrix with 2 columns.")
    }
    if (length(corr.yx) == 0 & length(betas) == 0 & quiet == 
        FALSE) 
        message("All betas will be set to 0 if using corrsys or corrsys2.")
    if (class(betas) == "list" & length(betas) == 1 & quiet == 
        FALSE) 
        message("All betas will be set to betas[[1]].")
    if (class(betas) != "list" | (class(betas) == "list" & !(length(betas) %in% 
        c(0, 1, M)))) 
        stop("Betas should be list of length 0, 1 or M.")
    if (length(betas.subj) == 0 & !is.null(subj.var) & quiet == 
        FALSE) 
        message("All betas.subj will be set to 0 if using corrsys or corrsys2.")
    if (class(betas.subj) == "list" & length(betas.subj) == 1 & 
        quiet == FALSE) 
        message("All betas.subj will be set to betas.subj[[1]] if using corrsys or\n            corrsys2.")
    if (class(betas.subj) != "list" | (class(betas.subj) == "list" & 
        !(length(betas.subj) %in% c(0, 1, M)))) 
        stop("betas.subj should be list of length 0, 1 or M.")
    if (length(betas.int) == 0 & !is.null(int.var) & quiet == 
        FALSE) 
        message("All betas.int will be set to 0 if using corrsys or corrsys2.")
    if (class(betas.int) == "list" & length(betas.int) == 1 & 
        quiet == FALSE) 
        message("All betas.int will be set to betas.int[[1]] if using corrsys or\n            corrsys2.")
    if (class(betas.int) != "list" | (class(betas.int) == "list" & 
        !(length(betas.int) %in% c(0, 1, M)))) 
        stop("betas.int should be list of length 0, 1 or M.")
    if (length(betas.tint) == 0 & !is.null(tint.var) & quiet == 
        FALSE) 
        message("All betas.tint will be set to 0 if using corrsys or corrsys2.")
    if (class(betas.tint) == "list" & length(betas.tint) == 1 & 
        quiet == FALSE) 
        message("All betas.tint will be set to betas.tint[[1]] if using corrsys or\n            corrsys2.")
    if (class(betas.tint) != "list" | (class(betas.tint) == "list" & 
        !(length(betas.tint) %in% c(0, 1, M)))) 
        stop("betas.tint should be list of length 0, 1 or M.")
    return(TRUE)
}
<bytecode: 0xcf0e7c8>
<environment: namespace:SimRepeat>
 --- function search by body ---
Function checkpar in namespace SimRepeat has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 541-545 (Corr_Cont_System.Rmd) 
Error: processing vignette 'Corr_Cont_System.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building 'Corr_Cont_System.Rmd'

--- re-building 'Corr_MultiVarType_System.Rmd' using rmarkdown
Loading required package: SimMultiCorrData

Attaching package: 'SimMultiCorrData'

The following object is masked from 'package:stats':

    poly

Loading required package: SimCorrMix
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
SimRepeat
 --- call from context --- 
checkpar(M, method, error_type, means, vars, skews, skurts, fifths, 
    sixths, Six, mix_pis, mix_mus, mix_sigmas, mix_skews, mix_skurts, 
    mix_fifths, mix_sixths, mix_Six, marginal, support, lam, 
    p_zip, pois_eps = list(), size, prob, mu, p_zinb, nb_eps = list(), 
    corr.x, corr.yx = list(), corr.e, same.var, subj.var, int.var, 
    tint.var, betas.0, betas, betas.subj, betas.int, betas.t, 
    betas.tint, quiet = TRUE)
 --- call from argument --- 
if (class(same.var) == "matrix") {
    if (ncol(same.var) != 4) 
        stop("same.var should be matrix with 4 columns.")
} else if (class(same.var) == "numeric") {
    if (length(same.var) > ncol(corr.x[[1]][[1]])) 
        stop("same.var should be vector with at most ncol(corr.x[[1]][[1]])\n             elements.")
} else stop("same.var should be vector or matrix.")
 --- R stacktrace ---
where 1: checkpar(M, method, error_type, means, vars, skews, skurts, fifths, 
    sixths, Six, mix_pis, mix_mus, mix_sigmas, mix_skews, mix_skurts, 
    mix_fifths, mix_sixths, mix_Six, marginal, support, lam, 
    p_zip, pois_eps = list(), size, prob, mu, p_zinb, nb_eps = list(), 
    corr.x, corr.yx = list(), corr.e, same.var, subj.var, int.var, 
    tint.var, betas.0, betas, betas.subj, betas.int, betas.t, 
    betas.tint, quiet = TRUE)
where 2: eval(expr, envir, enclos)
where 3: eval(expr, envir, enclos)
where 4: withVisible(eval(expr, envir, enclos))
where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 9: evaluate::evaluate(...)
where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 12: block_exec(params)
where 13: call_block(x)
where 14: process_group.block(group)
where 15: process_group(group)
where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 17: process_file(text, output)
where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 20: vweave_rmarkdown(...)
where 21: engine$weave(file, quiet = quiet, encoding = enc)
where 22: doTryCatch(return(expr), name, parentenv, handler)
where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 24: tryCatchList(expr, classes, parentenv, handlers)
where 25: 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 26: tools:::.buildOneVignette("Corr_MultiVarType_System.Rmd", "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/SimRepeat.Rcheck/vign_test/SimRepeat", 
    TRUE, FALSE, "Corr_MultiVarType_System", "UTF-8", "/tmp/RtmpL6YZga/file61837cffca6b.rds")

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (M = NULL, method = c("Fleishman", "Polynomial"), error_type = c("non_mix", 
    "mix"), means = list(), vars = list(), skews = list(), skurts = list(), 
    fifths = list(), sixths = list(), Six = list(), mix_pis = list(), 
    mix_mus = list(), mix_sigmas = list(), mix_skews = list(), 
    mix_skurts = list(), mix_fifths = list(), mix_sixths = list(), 
    mix_Six = list(), marginal = list(), support = list(), lam = list(), 
    p_zip = list(), pois_eps = list(), size = list(), prob = list(), 
    mu = list(), p_zinb = list(), nb_eps = list(), corr.x = list(), 
    corr.yx = list(), corr.e = NULL, same.var = NULL, subj.var = NULL, 
    int.var = NULL, tint.var = NULL, betas.0 = NULL, betas = list(), 
    betas.subj = list(), betas.int = list(), betas.t = NULL, 
    betas.tint = list(), rand.int = c("none", "non_mix", "mix"), 
    rand.tsl = c("none", "non_mix", "mix"), rand.var = NULL, 
    corr.u = list(), quiet = FALSE) 
{
    if (length(error_type) != 1) 
        stop("Please choose one type of distribution for all of the error terms:\n         mix if all errors have continuous mixture distributions,\n         non_mix if all errors have continuous non-mixture distributions.")
    if (length(method) != 1) 
        stop("Choose a PMT method for the continuous variables.")
    K.cat <- rep(0, M)
    K.pois <- rep(0, M)
    K.nb <- rep(0, M)
    if (length(marginal) > 0) 
        K.cat <- lengths(marginal)
    if (max(K.cat) > 0) {
        if (!all(unlist(lapply(marginal, function(x) unlist(lapply(x, 
            function(y) (sort(y) == y & min(y) > 0 & max(y) < 
                1))))))) 
            stop("Error in given marginal distributions.")
        if (length(support) > 0) {
            if (!all(K.cat %in% lengths(support))) 
                stop("Lengths of support do not match lengths of marginal.")
            k.cat <- unlist(lapply(marginal, function(x) lengths(x) + 
                1))
            k.cat2 <- unlist(lapply(support, function(x) lengths(x)))
            if (!all(mapply(function(x, y) (if (y == 0 | y == 
                x) TRUE else FALSE), k.cat, k.cat2))) 
                stop("Error in given support values.")
        }
    }
    if (length(lam) > 0) 
        K.pois <- lengths(lam)
    if (max(K.pois) > 0) {
        if (sum(sapply(lam, function(x) sum(x < 0)) > 0) > 0) 
            stop("Lambda values cannot be negative.")
        if (class(p_zip) == "numeric" & length(p_zip) == 1 & 
            quiet == FALSE) {
            message("All p_zip values will be set at p_zip.")
        }
        else if (class(p_zip) == "numeric" & length(p_zip) == 
            M & quiet == FALSE) {
            message("All p_zip[[p]] values will be set at p_zip[p].")
        }
        else if (class(p_zip) == "list" & length(p_zip) == M & 
            quiet == FALSE) {
            for (p in 1:M) {
                if (length(p_zip[[p]]) != K.pois[p]) 
                  message(paste("Missing value of p_zip for equation ", 
                    p, " will be set at 0.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All p_zip values will be set at 0.")
        }
        if (class(pois_eps) == "numeric" & length(pois_eps) == 
            1 & quiet == FALSE) {
            message("All pois_eps values will be set at pois_eps.")
        }
        else if (class(pois_eps) == "numeric" & length(pois_eps) == 
            M & quiet == FALSE) {
            message("All pois_eps[[p]] values will be set at pois_eps[p].")
        }
        else if (class(pois_eps) == "list" & length(pois_eps) == 
            M & quiet == FALSE) {
            for (p in 1:M) {
                if (length(pois_eps[[p]]) != K.pois[p]) 
                  message(paste("Missing value of pois_eps for equation ", 
                    p, " will be set at 0.0001.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All pois_eps values will be set at 0.0001.")
        }
    }
    if (length(size) > 0) 
        K.nb <- lengths(size)
    if (max(K.nb) > 0) {
        if (sum(sapply(size, function(x) sum(x < 0)) > 0) > 0) 
            stop("Size values cannot be negative.")
        if (length(prob) > 0) {
            if (sum(sapply(prob, function(x) sum(x < 0)) > 0) > 
                0) 
                stop("Prob values cannot be negative.")
            if (!all(lengths(prob) %in% K.nb)) 
                stop("Check lengths of prob vectors.")
        }
        if (length(mu) > 0) {
            if (sum(sapply(mu, function(x) sum(x < 0)) > 0) > 
                0) 
                stop("mu values cannot be negative.")
            if (!all(lengths(mu) %in% K.nb)) 
                stop("Check lengths of mu vectors.")
        }
        if (class(p_zinb) == "numeric" & length(p_zinb) == 1 & 
            quiet == FALSE) {
            message("All p_zinb values will be set at p_zinb.")
        }
        else if (class(p_zinb) == "numeric" & length(p_zinb) == 
            M & quiet == FALSE) {
            message("All p_zinb[[p]] values will be set at p_zinb[p].")
        }
        else if (class(p_zinb) == "list" & length(p_zinb) == 
            M & quiet == FALSE) {
            for (p in 1:M) {
                if (length(p_zinb[[p]]) != K.nb[p]) 
                  message(paste("Missing value of p_zinb for equation ", 
                    p, " will be set at 0.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All p_zinb values will be set at 0.")
        }
        if (class(nb_eps) == "numeric" & length(nb_eps) == 1 & 
            quiet == FALSE) {
            message("All nb_eps values will be set at nb_eps.")
        }
        else if (class(nb_eps) == "numeric" & length(nb_eps) == 
            M & quiet == FALSE) {
            message("All nb_eps[[p]] values will be set at nb_eps[p].")
        }
        else if (class(nb_eps) == "list" & length(nb_eps) == 
            M & quiet == FALSE) {
            for (p in 1:M) {
                if (length(nb_eps[[p]]) != K.nb[p]) 
                  message(paste("Missing value of nb_eps for equation ", 
                    p, " will be set at 0.0001.", sep = ""))
            }
        }
        else if (quiet == FALSE) {
            message("All nb_eps values will be set at 0.0001.")
        }
    }
    if (!(length(means) %in% c(M, 1 + M, 2 * M)) | !(length(vars) %in% 
        c(M, 1 + M, 2 * M))) 
        stop("Each equation must have a continuous error term with means given in\n         means and variances in vars.  Length of means and vars\n         should be M, 1 + M, or 2 * M.")
    M0 <- length(means)
    K.mix <- rep(0, M0)
    K.comp <- rep(0, M0)
    if (length(mix_pis) > 0) {
        if (length(mix_pis) == M0) {
            K.mix <- lengths(mix_pis)
            K.comp <- lengths(lapply(mix_pis, unlist))
        }
        else {
            K.mix <- c(lengths(mix_pis), rep(0, M0 - M))
            K.comp <- c(lengths(lapply(mix_pis, unlist)), rep(0, 
                M0 - M))
        }
    }
    K.cont <- lengths(vars) - K.mix
    if (!all(lengths(means) %in% (K.cont + K.mix))) 
        stop("Lengths of mean vectors should be same as lengths of vars vectors.")
    if (max(K.cont) > 0) {
        if (!all(lengths(skews) %in% K.cont) | !all(lengths(skurts) %in% 
            K.cont)) 
            stop("Lengths of continuous non-mixture lists should equal lengths of\n           vars minus the number of continuous mixture variables.")
        if (method == "Polynomial") {
            if (!all(lengths(fifths) %in% K.cont) | !all(lengths(sixths) %in% 
                K.cont)) 
                stop("Lengths of continuous non-mixture lists should equal lengths of\n             vars minus the number of continuous mixture variables.")
            if (!(length(Six) %in% c(0, M, 1 + M, 2 * M))) 
                stop("Six should be either list() or a list of length M, M + 1,\n             or 2 * M.")
            if (length(Six) != 0) {
                for (i in 1:length(Six)) {
                  if (!(length(Six[[i]]) %in% c(0, K.cont[i]))) 
                    stop("The i-th element of Six should be either NULL or a list of\n                 the same length as the i-th element of sixths.")
                }
            }
        }
    }
    if (length(mix_pis) > 0) {
        if (!all(lengths(mix_mus) %in% K.mix) | !all(lengths(mix_sigmas) %in% 
            K.mix) | !all(lengths(mix_skews) %in% K.mix) | !all(lengths(mix_skurts) %in% 
            K.mix)) 
            stop("Lengths of mixing parameter lists should be equal to the number\n           of mixture variables.")
        if (method == "Polynomial") {
            if (!all(lengths(mix_fifths) %in% K.mix) | !all(lengths(mix_sixths) %in% 
                K.mix)) 
                stop("Lengths of mixing parameter lists should be equal to the number\n             of mixture variables.")
            if (!(length(mix_Six) %in% c(0, M, M + 1, 2 * M))) 
                stop("mix_Six should be either list() or a list of length M, M + 1,\n             or 2 * M.")
            if (length(mix_Six) != 0) {
                for (i in 1:length(mix_Six)) {
                  if (!(length(mix_Six[[i]]) %in% c(0, K.comp[i]))) 
                    stop("The i-th element of mix_Six should be either NULL or a list\n                 of the same length as the i-th element of mix_sixths.")
                }
            }
        }
    }
    if (length(means) %in% c(2 * M, M + 1)) {
        means <- means[1:M]
        vars <- vars[1:M]
    }
    if (length(mix_pis) %in% c(2 * M, M + 1)) 
        mix_pis <- mix_pis[1:M]
    K.mix <- rep(0, M)
    K.comp <- rep(0, M)
    K.error <- rep(0, M)
    if (length(mix_pis) > 0) {
        K.mix <- lengths(mix_pis)
        K.comp <- sapply(lapply(mix_pis, unlist), length)
    }
    K.cont <- lengths(vars) - K.mix
    k.mix <- c(0, cumsum(K.mix))
    if (error_type == "mix") {
        K.error <- sapply(mix_pis, function(x) lengths(x[length(x)]))
        K.x <- K.cont + K.comp - K.error + K.cat + K.pois + K.nb
        K.cont2 <- K.cont
        K.mix2 <- K.mix - 1
    }
    else {
        K.x <- K.cont + K.comp - 1 + K.cat + K.pois + K.nb
        K.cont2 <- K.cont - 1
        K.mix2 <- K.mix
    }
    if (sum(lengths(means) == 0) > 0 | sum(lengths(vars) == 0) > 
        0) 
        stop("Each equation must have a continuous error term with means given in\n         means and variances in vars.")
    if (length(corr.x) > 0) {
        if (length(corr.x) != M) 
            stop("corr.x should be list of length M.")
        if (!all(lengths(corr.x) %in% c(0, M))) 
            stop("corr.x should be list of lists of length M.")
        for (i in 1:M) {
            if (K.x[i] == 0) 
                next
            if (!all(sapply(corr.x[[i]], function(x) if (is.null(x)) 0 else nrow(x)) %in% 
                c(0, K.x[i]))) 
                stop("corr.x[[i]] should be list of matrices with number of rows equal\n             to number of independent variables for equation i.")
            for (j in 1:M) {
                if (K.x[j] == 0) 
                  next
                if (ncol(corr.x[[i]][[j]]) != K.x[j]) 
                  stop("corr.x[[i]][[j]] should be matrix with number of cols equal\n               to number of independent variables for equation j.")
            }
        }
    }
    if (length(corr.yx) > 0) {
        if (length(corr.yx) != M) 
            stop("corr.yx should be a list of length M.")
        if (!all(sapply(corr.yx, function(x) if (is.null(x)) 0 else nrow(x)) %in% 
            c(0, 1))) 
            stop("corr.yx should be a list of matrices with 1 row each.")
        if (!all(sapply(corr.yx, function(x) if (is.null(x)) 0 else ncol(x)) %in% 
            K.x) & !all(sapply(corr.yx, function(x) if (is.null(x)) 0 else ncol(x)) %in% 
            (K.cont2 + K.mix2))) 
            stop("corr.yx should be a list of matrices with 1 row each.\n           The number of columns should either equal the number of non-mixture\n           plus components of mixture variables or the number of non-mixture\n           plus mixture variables.")
    }
    K.r <- rep(0, M)
    if (class(corr.u) == "list" & length(corr.u) > 0) {
        K.r <- sapply(mapply("[", corr.u, lengths(corr.u), SIMPLIFY = FALSE), 
            function(x) if (is.null(x)) 
                0
            else nrow(x[[1]]))
        if (length(corr.u) != M) 
            stop("corr.u should be list of length M.")
        if (!all(lengths(corr.u) %in% c(0, M))) 
            stop("corr.u should be list of lists of length M.")
        for (i in 1:M) {
            if (K.r[i] == 0) 
                next
            if (!all(sapply(corr.u[[i]], function(x) if (is.null(x)) 0 else nrow(x)) %in% 
                c(0, K.r[i]))) 
                stop("corr.u[[i]] should be list of matrices with number of rows equal\n             to number of random effects for equation i.")
            for (j in 1:M) {
                if (K.r[j] == 0) 
                  next
                if (ncol(corr.u[[i]][[j]]) != K.r[j]) 
                  stop("corr.u[[i]][[j]] should be matrix with number of cols equal\n               to number of random effects for equation j.")
            }
        }
    }
    if (max(K.r) > 0) {
        if (length(rand.int) != M & quiet == FALSE) 
            message("The random intercept for all equations will be set at\n              rand.int[1].")
        if (length(rand.tsl) != M & quiet == FALSE) 
            message("The random time slope for all equations will be set at\n              rand.tsl[1].")
        if (!is.null(rand.var)) {
            if (ncol(rand.var) != 2) 
                stop("rand.var should be matrix with 2 columns.")
        }
    }
    if (quiet == FALSE) {
        if (is.null(betas.0)) 
            message("The intercepts will all be set at 0.")
        if (length(betas.0) < M & length(betas.0) > 0) 
            message("The intercepts will all be set at betas.0[1].")
        if (length(corr.yx) == 0 & is.null(betas.t)) 
            message("The time slopes will all be set at 1.")
        if (length(betas.t) < M & length(betas.t) > 0) 
            message("The time slopes will all be set at betas.t[1].")
    }
    if (!is.null(same.var)) {
        if (class(same.var) == "matrix") {
            if (ncol(same.var) != 4) 
                stop("same.var should be matrix with 4 columns.")
        }
        else if (class(same.var) == "numeric") {
            if (length(same.var) > ncol(corr.x[[1]][[1]])) 
                stop("same.var should be vector with at most ncol(corr.x[[1]][[1]])\n             elements.")
        }
        else stop("same.var should be vector or matrix.")
    }
    if (!is.null(subj.var)) {
        if (ncol(subj.var) != 2) 
            stop("subj.var should be matrix with 2 columns.")
    }
    if (!is.null(int.var)) {
        if (ncol(int.var) != 3) 
            stop("int.var should be matrix with 3 columns.")
    }
    if (!is.null(tint.var)) {
        if (ncol(tint.var) != 2) 
            stop("tint.var should be matrix with 2 columns.")
    }
    if (length(corr.yx) == 0 & length(betas) == 0 & quiet == 
        FALSE) 
        message("All betas will be set to 0 if using corrsys or corrsys2.")
    if (class(betas) == "list" & length(betas) == 1 & quiet == 
        FALSE) 
        message("All betas will be set to betas[[1]].")
    if (class(betas) != "list" | (class(betas) == "list" & !(length(betas) %in% 
        c(0, 1, M)))) 
        stop("Betas should be list of length 0, 1 or M.")
    if (length(betas.subj) == 0 & !is.null(subj.var) & quiet == 
        FALSE) 
        message("All betas.subj will be set to 0 if using corrsys or corrsys2.")
    if (class(betas.subj) == "list" & length(betas.subj) == 1 & 
        quiet == FALSE) 
        message("All betas.subj will be set to betas.subj[[1]] if using corrsys or\n            corrsys2.")
    if (class(betas.subj) != "list" | (class(betas.subj) == "list" & 
        !(length(betas.subj) %in% c(0, 1, M)))) 
        stop("betas.subj should be list of length 0, 1 or M.")
    if (length(betas.int) == 0 & !is.null(int.var) & quiet == 
        FALSE) 
        message("All betas.int will be set to 0 if using corrsys or corrsys2.")
    if (class(betas.int) == "list" & length(betas.int) == 1 & 
        quiet == FALSE) 
        message("All betas.int will be set to betas.int[[1]] if using corrsys or\n            corrsys2.")
    if (class(betas.int) != "list" | (class(betas.int) == "list" & 
        !(length(betas.int) %in% c(0, 1, M)))) 
        stop("betas.int should be list of length 0, 1 or M.")
    if (length(betas.tint) == 0 & !is.null(tint.var) & quiet == 
        FALSE) 
        message("All betas.tint will be set to 0 if using corrsys or corrsys2.")
    if (class(betas.tint) == "list" & length(betas.tint) == 1 & 
        quiet == FALSE) 
        message("All betas.tint will be set to betas.tint[[1]] if using corrsys or\n            corrsys2.")
    if (class(betas.tint) != "list" | (class(betas.tint) == "list" & 
        !(length(betas.tint) %in% c(0, 1, M)))) 
        stop("betas.tint should be list of length 0, 1 or M.")
    return(TRUE)
}
<bytecode: 0xb0aca60>
<environment: namespace:SimRepeat>
 --- function search by body ---
Function checkpar in namespace SimRepeat has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 531-537 (Corr_MultiVarType_System.Rmd) 
Error: processing vignette 'Corr_MultiVarType_System.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building 'Corr_MultiVarType_System.Rmd'

--- re-building 'HLM_Approach.Rmd' using rmarkdown
--- finished re-building 'HLM_Approach.Rmd'

--- re-building 'Theory_Cont_System.Rmd' using rmarkdown
--- finished re-building 'Theory_Cont_System.Rmd'

SUMMARY: processing the following files failed:
  'Corr_Cont_System.Rmd' 'Corr_MultiVarType_System.Rmd'

Error: Vignette re-building failed.
Execution halted