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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fibrinogen
> ### Title: Fibrinogen Studies Collaboration
> ### Aliases: fibrinogen
> ### Keywords: datasets
> 
> ### ** Examples
> 
> ### REPRODUCE THE RESULTS IN WHITE (2009) AND JACKSON ET AL. (2010)
> 
> # INSPECT THE DATA
> head(fibrinogen)
  cohort           b2          b3         b4        b5      V_2_2      V_2_3
1      1  0.252366632  0.53170693  0.9464425 1.4009348 0.03591865 0.02508728
2      2 -0.184167668 -0.03180776  0.1185954 0.5671058 0.34832495 0.18939747
3      3  0.001030372 -0.52864528 -0.3390995 0.4163348 0.37536496 0.24996307
4      4  0.065784343  0.18355742  0.4065832 0.6450171 0.05759551 0.04175191
5      5  0.077638909  0.40645304  0.5442160 1.0878220 0.10126193 0.05600454
6      6 -0.113321237  0.45640695  0.4555633 0.8752530 0.06492682 0.02341051
       V_2_4      V_2_5      V_3_3      V_3_4      V_3_5      V_4_4      V_4_5
1 0.02512949 0.02513940 0.03256974 0.02523587 0.02525483 0.03103106 0.02537686
2 0.19161053 0.19551039 0.34446433 0.20458534 0.20916429 0.40842286 0.21454701
3 0.24960472 0.24948616 0.32252783 0.25055113 0.25082681 0.28301525 0.25098649
4 0.04176119 0.04178248 0.05280399 0.04183426 0.04188637 0.04838277 0.04196585
5 0.05614832 0.05622534 0.08338879 0.05661783 0.05676502 0.07697710 0.05714733
6 0.02353066 0.02394760 0.05397056 0.02376115 0.02423115 0.06393713 0.02441860
       V_5_5
1 0.03166101
2 0.43007851
3 0.25984231
4 0.05083219
5 0.06780010
6 0.07775327
> 
> # REML MODEL
> y <- as.matrix(fibrinogen[2:5])
> S <- as.matrix(fibrinogen[6:15])
> model <- mvmeta(y,S)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mvmeta
 --- call from context --- 
mvmeta(y, S)
 --- call from argument --- 
if (class(eval(mcall[[mn[1]]], if (missing(data)) parent.frame() else data)) != 
    "formula") {
    formula <- as.formula(paste(deparse(substitute(formula), 
        width.cutoff = 499L), "~ 1"))
    environment(formula) <- parent.frame()
    call[[mn[1]]] <- mcall[[mn[1]]] <- formula
}
 --- R stacktrace ---
where 1: mvmeta(y, S)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (formula, S, data, subset, method = "reml", bscov = "unstr", 
    model = TRUE, contrasts = NULL, offset, na.action, control = list()) 
{
    call <- match.call()
    mcall <- match.call(expand.dots = FALSE)
    mn <- match(c("formula", "data", "subset", "weights", "na.action", 
        "offset"), names(mcall), 0L)
    mcall <- mcall[c(1L, mn)]
    mcall$drop.unused.levels <- TRUE
    mcall[[1L]] <- as.name("model.frame")
    if (class(eval(mcall[[mn[1]]], if (missing(data)) parent.frame() else data)) != 
        "formula") {
        formula <- as.formula(paste(deparse(substitute(formula), 
            width.cutoff = 499L), "~ 1"))
        environment(formula) <- parent.frame()
        call[[mn[1]]] <- mcall[[mn[1]]] <- formula
    }
    if (missing(data)) 
        data <- environment(formula)
    mcall$na.action <- "na.pass"
    mf <- eval(mcall, parent.frame())
    class(mf) <- c("data.frame.mvmeta", class(mf))
    if (missing(na.action)) 
        na.action <- getOption("na.action")
    if (length(na.action)) 
        mf <- do.call(na.action, list(mf))
    if (method == "model.frame") 
        return(mf)
    if (is.empty.model(mf)) 
        stop("empty model not allowed")
    method <- match.arg(method, c("fixed", "ml", "reml", "mm", 
        "vc"))
    bscov <- match.arg(bscov, c("unstr", "diag", "id", "cs", 
        "hcs", "ar1", "prop", "cor", "fixed"))
    if (bscov != "unstr" && !method %in% c("ml", "reml")) 
        stop("structured Psi only available for methods 'ml' or 'reml'")
    terms <- attr(mf, "terms")
    y <- as.matrix(model.response(mf, "numeric"))
    X <- model.matrix(terms, mf, contrasts)
    offset <- as.vector(model.offset(mf))
    if (!is.null(offset)) {
        if (length(offset) != NROW(y)) 
            stop("number of offsets should equal number of observations")
    }
    S <- eval(call$S, data, parent.frame())
    S <- mkS(S, y, attr(mf, "na.action"), if (missing(subset)) 
        NULL
    else eval(call$subset, data, parent.frame()))
    if (nrow(y) < 2L) 
        stop("less than 2 valid studies after exclusion of missing")
    fit <- mvmeta.fit(X, y, S, offset, method, bscov, control)
    fit$model <- if (model) 
        mf
    else NULL
    fit$S <- S
    fit$na.action <- attr(mf, "na.action")
    fit$call <- call
    fit$formula <- formula
    fit$terms <- terms
    fit$contrasts <- attr(X, "contrasts")
    fit$xlevels <- .getXlevels(terms, mf)
    class(fit) <- "mvmeta"
    fit
}
<bytecode: 0x562851673710>
<environment: namespace:mvmeta>
 --- function search by body ---
Function mvmeta in namespace mvmeta has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1