Error(s) in re-building vignettes:
  ...
--- re-building ‘PCMBase.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
PCMBase
 --- call from context --- 
PCMLik.GaussianPCM(traits, tree.ab, modelBM.ab)
 --- call from argument --- 
if (class(loglik) == "try-error") {
    err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating loglik from X0 and the coefficients L,m,r. ", 
        "X0=", toString(X0), "L0=", toString(L0), "; m0=", toString(m0), 
        "; r0=", r0, ". Error message from call to X0 %*% L0 %*% X0 + m0 %*% X0 + r0:", 
        loglik, "\n")
    errL <- PCMParseErrorMessage(err)
    if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
        if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
            warning(err)
        }
        else {
            stop(err)
        }
    }
    attr(value.NA, "X0") <- X0
    attr(value.NA, "error") <- errL
    return(value.NA)
}
 --- R stacktrace ---
where 1: PCMLik.GaussianPCM(traits, tree.ab, modelBM.ab)
where 2: PCMLik(traits, tree.ab, modelBM.ab)
where 3: eval(expr, envir, enclos)
where 4: eval(expr, envir, enclos)
where 5: withVisible(eval(expr, envir, enclos))
where 6: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 7: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 8: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 9: 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 10: evaluate::evaluate(...)
where 11: 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: 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 13: block_exec(params)
where 14: call_block(x)
where 15: process_group.block(group)
where 16: process_group(group)
where 17: 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 18: process_file(text, output)
where 19: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 20: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 21: vweave_rmarkdown(...)
where 22: engine$weave(file, quiet = quiet, encoding = enc)
where 23: doTryCatch(return(expr), name, parentenv, handler)
where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 25: tryCatchList(expr, classes, parentenv, handlers)
where 26: 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 27: tools:::.buildOneVignette("PCMBase.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/PCMBase.Rcheck/vign_test/PCMBase", 
    TRUE, FALSE, "PCMBase", "UTF-8", "/home/hornik/tmp/scratch/RtmpZdPitP/file4b026e72352.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (X, tree, model, SE = matrix(0, PCMNumTraits(model), 
    PCMTreeNumTips(tree)), metaI = PCMInfo(X = X, tree = tree, 
    model = model, SE = SE, verbose = verbose), log = TRUE, verbose = FALSE) 
{
    if (is.Transformable(model)) {
        model <- PCMApplyTransformation(model)
    }
    if (is.function(metaI)) {
        metaI <- metaI(X = X, tree = tree, model = model, SE = SE, 
            verbose = verbose)
    }
    value.NA <- getOption("PCMBase.Value.NA", as.double(NA))
    PCMLmr <- try(PCMLmr(X = X, tree = tree, model = model, SE = SE, 
        metaI = metaI, verbose = verbose, root.only = TRUE), 
        silent = TRUE)
    if (class(PCMLmr) == "try-error") {
        errL <- PCMParseErrorMessage(PCMLmr)
        if (is.null(errL)) {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating the coefficients L,m,r. Error message from call to PCMLmr: ", 
                PCMLmr, "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))))
            errL <- PCMParseErrorMessage(err)
        }
        else {
            err <- PCMLmr
        }
        if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
            if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                warning(err)
            }
            else {
                stop(err)
            }
        }
        k0 <- metaI$pc[, metaI$N + 1L]
        X0 <- rep(NaN, metaI$k)
        X0[k0] <- model$X0[k0]
        attr(value.NA, "X0") <- X0
        attr(value.NA, "error") <- errL
        return(value.NA)
    }
    else if (is.list(PCMLmr)) {
        L0 <- as.matrix(PCMLmr$L)
        m0 <- PCMLmr$m
        r0 <- PCMLmr$r
        k0 <- metaI$pc[, metaI$N + 1L]
        if (is.null(L0) | is.null(m0) | is.null(r0)) {
            err <- paste0("GaussianPCM.R:PCMLik:: The list returned by PCMLmr did not contain elements 'L', 'm' and 'r'.")
            if (!getOption("PCMBase.Ignore.Lmr.Errors", FALSE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            errL <- PCMParseErrorMessage(err)
            k0 <- metaI$pc[, metaI$N + 1L]
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- model$X0[k0]
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        if (is.null(model$X0) || isTRUE(all(is.na(model$X0)))) {
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- rep(NA_real_, sum(k0))
            X0[k0] <- try(solve(a = L0[k0, k0, drop = FALSE] + 
                t(L0[k0, k0, drop = FALSE]), b = -m0[k0]), silent = TRUE)
            if (class(X0[[1]]) == "try-error") {
                err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating X0 from L0,m0,r0. ", 
                  "L0=", toString(L0), "; m0=", toString(m0), 
                  "; r0=", r0, ". Error message:", X0[[1]], "\n")
                errL <- PCMParseErrorMessage(err)
                if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                  if (getOption("PCMBase.Errors.As.Warnings", 
                    TRUE)) {
                    warning(err)
                  }
                  else {
                    stop(err)
                  }
                }
                X0 <- NULL
                attr(value.NA, "X0") <- X0
                attr(value.NA, "error") <- errL
                return(value.NA)
            }
        }
        else {
            k0 <- metaI$pc[, metaI$N + 1L]
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- model$X0[k0]
        }
        loglik <- try(X0[k0] %*% L0[k0, k0, drop = FALSE] %*% 
            X0[k0] + m0[k0] %*% X0[k0] + r0, silent = TRUE)
        if (class(loglik) == "try-error") {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating loglik from X0 and the coefficients L,m,r. ", 
                "X0=", toString(X0), "L0=", toString(L0), "; m0=", 
                toString(m0), "; r0=", r0, ". Error message from call to X0 %*% L0 %*% X0 + m0 %*% X0 + r0:", 
                loglik, "\n")
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        value <- try(as.vector(if (log) 
            loglik
        else exp(loglik)), silent = TRUE)
        if (class(value) == "try-error") {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating value from loglik=", 
                toString(loglik), ". Error message from call to as.vector(if(log) loglik else exp(loglik)):", 
                value, "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))))
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        else if (is.na(value)) {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a possible numerical problem, e.g. division of 0 by 0 when calculating the likelihood. value=", 
                toString(value), "; calculated loglik=", toString(loglik), 
                "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))), ". No error message was returned from the call to PCMLmr. Check for runtime warnings.")
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                warning(err)
            }
            else {
                stop(err)
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        attr(value, "X0") <- X0
        return(value)
    }
}
<bytecode: 0x5581bd1668d8>
<environment: namespace:PCMBase>
 --- function search by body ---
Function PCMLik.GaussianPCM in namespace PCMBase has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘PCMCreateModel.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
PCMBase
 --- call from context --- 
PCMLik.GaussianPCM(mData, tree.ab, PCMBase_model_BM_drift)
 --- call from argument --- 
if (class(loglik) == "try-error") {
    err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating loglik from X0 and the coefficients L,m,r. ", 
        "X0=", toString(X0), "L0=", toString(L0), "; m0=", toString(m0), 
        "; r0=", r0, ". Error message from call to X0 %*% L0 %*% X0 + m0 %*% X0 + r0:", 
        loglik, "\n")
    errL <- PCMParseErrorMessage(err)
    if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
        if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
            warning(err)
        }
        else {
            stop(err)
        }
    }
    attr(value.NA, "X0") <- X0
    attr(value.NA, "error") <- errL
    return(value.NA)
}
 --- R stacktrace ---
where 1: PCMLik.GaussianPCM(mData, tree.ab, PCMBase_model_BM_drift)
where 2: PCMLik(mData, tree.ab, PCMBase_model_BM_drift)
where 3: eval(expr, envir, enclos)
where 4: eval(expr, envir, enclos)
where 5: withVisible(eval(expr, envir, enclos))
where 6: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 7: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 8: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 9: 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 10: evaluate::evaluate(...)
where 11: 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: 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 13: block_exec(params)
where 14: call_block(x)
where 15: process_group.block(group)
where 16: process_group(group)
where 17: 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 18: process_file(text, output)
where 19: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 20: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 21: vweave_rmarkdown(...)
where 22: engine$weave(file, quiet = quiet, encoding = enc)
where 23: doTryCatch(return(expr), name, parentenv, handler)
where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 25: tryCatchList(expr, classes, parentenv, handlers)
where 26: 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 27: tools:::.buildOneVignette("PCMCreateModel.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/PCMBase.Rcheck/vign_test/PCMBase", 
    TRUE, FALSE, "PCMCreateModel", "UTF-8", "/home/hornik/tmp/scratch/RtmpZdPitP/file4b044c38b36.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (X, tree, model, SE = matrix(0, PCMNumTraits(model), 
    PCMTreeNumTips(tree)), metaI = PCMInfo(X = X, tree = tree, 
    model = model, SE = SE, verbose = verbose), log = TRUE, verbose = FALSE) 
{
    if (is.Transformable(model)) {
        model <- PCMApplyTransformation(model)
    }
    if (is.function(metaI)) {
        metaI <- metaI(X = X, tree = tree, model = model, SE = SE, 
            verbose = verbose)
    }
    value.NA <- getOption("PCMBase.Value.NA", as.double(NA))
    PCMLmr <- try(PCMLmr(X = X, tree = tree, model = model, SE = SE, 
        metaI = metaI, verbose = verbose, root.only = TRUE), 
        silent = TRUE)
    if (class(PCMLmr) == "try-error") {
        errL <- PCMParseErrorMessage(PCMLmr)
        if (is.null(errL)) {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating the coefficients L,m,r. Error message from call to PCMLmr: ", 
                PCMLmr, "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))))
            errL <- PCMParseErrorMessage(err)
        }
        else {
            err <- PCMLmr
        }
        if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
            if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                warning(err)
            }
            else {
                stop(err)
            }
        }
        k0 <- metaI$pc[, metaI$N + 1L]
        X0 <- rep(NaN, metaI$k)
        X0[k0] <- model$X0[k0]
        attr(value.NA, "X0") <- X0
        attr(value.NA, "error") <- errL
        return(value.NA)
    }
    else if (is.list(PCMLmr)) {
        L0 <- as.matrix(PCMLmr$L)
        m0 <- PCMLmr$m
        r0 <- PCMLmr$r
        k0 <- metaI$pc[, metaI$N + 1L]
        if (is.null(L0) | is.null(m0) | is.null(r0)) {
            err <- paste0("GaussianPCM.R:PCMLik:: The list returned by PCMLmr did not contain elements 'L', 'm' and 'r'.")
            if (!getOption("PCMBase.Ignore.Lmr.Errors", FALSE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            errL <- PCMParseErrorMessage(err)
            k0 <- metaI$pc[, metaI$N + 1L]
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- model$X0[k0]
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        if (is.null(model$X0) || isTRUE(all(is.na(model$X0)))) {
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- rep(NA_real_, sum(k0))
            X0[k0] <- try(solve(a = L0[k0, k0, drop = FALSE] + 
                t(L0[k0, k0, drop = FALSE]), b = -m0[k0]), silent = TRUE)
            if (class(X0[[1]]) == "try-error") {
                err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating X0 from L0,m0,r0. ", 
                  "L0=", toString(L0), "; m0=", toString(m0), 
                  "; r0=", r0, ". Error message:", X0[[1]], "\n")
                errL <- PCMParseErrorMessage(err)
                if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                  if (getOption("PCMBase.Errors.As.Warnings", 
                    TRUE)) {
                    warning(err)
                  }
                  else {
                    stop(err)
                  }
                }
                X0 <- NULL
                attr(value.NA, "X0") <- X0
                attr(value.NA, "error") <- errL
                return(value.NA)
            }
        }
        else {
            k0 <- metaI$pc[, metaI$N + 1L]
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- model$X0[k0]
        }
        loglik <- try(X0[k0] %*% L0[k0, k0, drop = FALSE] %*% 
            X0[k0] + m0[k0] %*% X0[k0] + r0, silent = TRUE)
        if (class(loglik) == "try-error") {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating loglik from X0 and the coefficients L,m,r. ", 
                "X0=", toString(X0), "L0=", toString(L0), "; m0=", 
                toString(m0), "; r0=", r0, ". Error message from call to X0 %*% L0 %*% X0 + m0 %*% X0 + r0:", 
                loglik, "\n")
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        value <- try(as.vector(if (log) 
            loglik
        else exp(loglik)), silent = TRUE)
        if (class(value) == "try-error") {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating value from loglik=", 
                toString(loglik), ". Error message from call to as.vector(if(log) loglik else exp(loglik)):", 
                value, "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))))
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        else if (is.na(value)) {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a possible numerical problem, e.g. division of 0 by 0 when calculating the likelihood. value=", 
                toString(value), "; calculated loglik=", toString(loglik), 
                "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))), ". No error message was returned from the call to PCMLmr. Check for runtime warnings.")
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                warning(err)
            }
            else {
                stop(err)
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        attr(value, "X0") <- X0
        return(value)
    }
}
<bytecode: 0x55cfbbdb7d88>
<environment: namespace:PCMBase>
 --- function search by body ---
Function PCMLik.GaussianPCM in namespace PCMBase has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
--- re-building ‘PCMParam.Rmd’ using rmarkdown
--- finished re-building ‘PCMParam.Rmd’

--- re-building ‘PCMTracePruning.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
PCMBase
 --- call from context --- 
PCMLik.GaussianPCM(X[, tree$tip.label], tree, model.OU.BM)
 --- call from argument --- 
if (class(loglik) == "try-error") {
    err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating loglik from X0 and the coefficients L,m,r. ", 
        "X0=", toString(X0), "L0=", toString(L0), "; m0=", toString(m0), 
        "; r0=", r0, ". Error message from call to X0 %*% L0 %*% X0 + m0 %*% X0 + r0:", 
        loglik, "\n")
    errL <- PCMParseErrorMessage(err)
    if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
        if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
            warning(err)
        }
        else {
            stop(err)
        }
    }
    attr(value.NA, "X0") <- X0
    attr(value.NA, "error") <- errL
    return(value.NA)
}
 --- R stacktrace ---
where 1: PCMLik.GaussianPCM(X[, tree$tip.label], tree, model.OU.BM)
where 2: PCMLik(X[, tree$tip.label], tree, model.OU.BM)
where 3: eval(expr, envir, enclos)
where 4: eval(expr, envir, enclos)
where 5: withVisible(eval(expr, envir, enclos))
where 6: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 7: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 8: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 9: 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 10: evaluate::evaluate(...)
where 11: 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: 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 13: block_exec(params)
where 14: call_block(x)
where 15: process_group.block(group)
where 16: process_group(group)
where 17: 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 18: process_file(text, output)
where 19: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 20: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 21: vweave_rmarkdown(...)
where 22: engine$weave(file, quiet = quiet, encoding = enc)
where 23: doTryCatch(return(expr), name, parentenv, handler)
where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 25: tryCatchList(expr, classes, parentenv, handlers)
where 26: 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 27: tools:::.buildOneVignette("PCMTracePruning.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/PCMBase.Rcheck/vign_test/PCMBase", 
    TRUE, FALSE, "PCMTracePruning", "UTF-8", "/home/hornik/tmp/scratch/RtmpZdPitP/file4b07bfc13eb.rds")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (X, tree, model, SE = matrix(0, PCMNumTraits(model), 
    PCMTreeNumTips(tree)), metaI = PCMInfo(X = X, tree = tree, 
    model = model, SE = SE, verbose = verbose), log = TRUE, verbose = FALSE) 
{
    if (is.Transformable(model)) {
        model <- PCMApplyTransformation(model)
    }
    if (is.function(metaI)) {
        metaI <- metaI(X = X, tree = tree, model = model, SE = SE, 
            verbose = verbose)
    }
    value.NA <- getOption("PCMBase.Value.NA", as.double(NA))
    PCMLmr <- try(PCMLmr(X = X, tree = tree, model = model, SE = SE, 
        metaI = metaI, verbose = verbose, root.only = TRUE), 
        silent = TRUE)
    if (class(PCMLmr) == "try-error") {
        errL <- PCMParseErrorMessage(PCMLmr)
        if (is.null(errL)) {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating the coefficients L,m,r. Error message from call to PCMLmr: ", 
                PCMLmr, "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))))
            errL <- PCMParseErrorMessage(err)
        }
        else {
            err <- PCMLmr
        }
        if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
            if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                warning(err)
            }
            else {
                stop(err)
            }
        }
        k0 <- metaI$pc[, metaI$N + 1L]
        X0 <- rep(NaN, metaI$k)
        X0[k0] <- model$X0[k0]
        attr(value.NA, "X0") <- X0
        attr(value.NA, "error") <- errL
        return(value.NA)
    }
    else if (is.list(PCMLmr)) {
        L0 <- as.matrix(PCMLmr$L)
        m0 <- PCMLmr$m
        r0 <- PCMLmr$r
        k0 <- metaI$pc[, metaI$N + 1L]
        if (is.null(L0) | is.null(m0) | is.null(r0)) {
            err <- paste0("GaussianPCM.R:PCMLik:: The list returned by PCMLmr did not contain elements 'L', 'm' and 'r'.")
            if (!getOption("PCMBase.Ignore.Lmr.Errors", FALSE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            errL <- PCMParseErrorMessage(err)
            k0 <- metaI$pc[, metaI$N + 1L]
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- model$X0[k0]
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        if (is.null(model$X0) || isTRUE(all(is.na(model$X0)))) {
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- rep(NA_real_, sum(k0))
            X0[k0] <- try(solve(a = L0[k0, k0, drop = FALSE] + 
                t(L0[k0, k0, drop = FALSE]), b = -m0[k0]), silent = TRUE)
            if (class(X0[[1]]) == "try-error") {
                err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating X0 from L0,m0,r0. ", 
                  "L0=", toString(L0), "; m0=", toString(m0), 
                  "; r0=", r0, ". Error message:", X0[[1]], "\n")
                errL <- PCMParseErrorMessage(err)
                if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                  if (getOption("PCMBase.Errors.As.Warnings", 
                    TRUE)) {
                    warning(err)
                  }
                  else {
                    stop(err)
                  }
                }
                X0 <- NULL
                attr(value.NA, "X0") <- X0
                attr(value.NA, "error") <- errL
                return(value.NA)
            }
        }
        else {
            k0 <- metaI$pc[, metaI$N + 1L]
            X0 <- rep(NaN, metaI$k)
            X0[k0] <- model$X0[k0]
        }
        loglik <- try(X0[k0] %*% L0[k0, k0, drop = FALSE] %*% 
            X0[k0] + m0[k0] %*% X0[k0] + r0, silent = TRUE)
        if (class(loglik) == "try-error") {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating loglik from X0 and the coefficients L,m,r. ", 
                "X0=", toString(X0), "L0=", toString(L0), "; m0=", 
                toString(m0), "; r0=", r0, ". Error message from call to X0 %*% L0 %*% X0 + m0 %*% X0 + r0:", 
                loglik, "\n")
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        value <- try(as.vector(if (log) 
            loglik
        else exp(loglik)), silent = TRUE)
        if (class(value) == "try-error") {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a problem calculating value from loglik=", 
                toString(loglik), ". Error message from call to as.vector(if(log) loglik else exp(loglik)):", 
                value, "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))))
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Raise.Lik.Errors", TRUE)) {
                if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                  warning(err)
                }
                else {
                  stop(err)
                }
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        else if (is.na(value)) {
            err <- paste0("GaussianPCM.R:PCMLik:: There was a possible numerical problem, e.g. division of 0 by 0 when calculating the likelihood. value=", 
                toString(value), "; calculated loglik=", toString(loglik), 
                "; print(model):", do.call(paste, c(as.list(capture.output(print(model))), 
                  list(sep = "\n"))), ". No error message was returned from the call to PCMLmr. Check for runtime warnings.")
            errL <- PCMParseErrorMessage(err)
            if (getOption("PCMBase.Errors.As.Warnings", TRUE)) {
                warning(err)
            }
            else {
                stop(err)
            }
            attr(value.NA, "X0") <- X0
            attr(value.NA, "error") <- errL
            return(value.NA)
        }
        attr(value, "X0") <- X0
        return(value)
    }
}
<bytecode: 0x5570adc6d860>
<environment: namespace:PCMBase>
 --- function search by body ---
Function PCMLik.GaussianPCM in namespace PCMBase has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
SUMMARY: processing the following files failed:
  ‘PCMBase.Rmd’ ‘PCMCreateModel.Rmd’ ‘PCMTracePruning.Rmd’

Error: Vignette re-building failed.
Execution halted