Error(s) in re-building vignettes:
  ...
--- re-building ‘BayesianTools.Rmd’ using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
BayesianTools
 --- call from context --- 
getSample.mcmcSampler(sampler, parametersOnly = F, ...)
 --- call from argument --- 
if (class(sampler$chain) == "matrix") {
    if (is.null(end)) 
        end = nrow(sampler$chain)
    if (parametersOnly == T) {
        out = sampler$chain[start:end, 1:sampler$setup$numPars]
        if (class(out) == "numeric") 
            out = as.matrix(out)
        if (!is.null(sampler$setup$names)) 
            colnames(out) = sampler$setup$names
    }
    else {
        out = sampler$chain[start:end, ]
        if (!is.null(sampler$setup$names)) 
            colnames(out) = c(sampler$setup$names, "Lposterior", 
                "Llikelihood", "Lprior")
    }
    if (thin == "auto") {
        thin = max(floor(nrow(out)/5000), 1)
    }
    if (is.null(thin) || thin == F || thin < 1 || is.nan(thin)) 
        thin = 1
    if (thin > nrow(out)) 
        warning("thin is greater than the total number of samples!")
    if (!thin == 1) {
        sel = seq(1, dim(out)[1], by = thin)
        out = out[sel, ]
    }
    if (thin == 1 && !is.null(numSamples)) {
        out <- sampleEquallySpaced(out, numSamples)
    }
    if (!is.null(whichParameters)) 
        out = out[, whichParameters]
    if (coda == T) 
        out = makeObjectClassCodaMCMC(out, start = start, end = end, 
            thin = thin)
} else if (class(sampler$chain) == "mcmc.list") {
    out = list()
    for (i in 1:length(sampler$chain)) {
        if (is.null(end)) 
            end = nrow(sampler$chain[[1]])
        temp = sampler$chain[[i]][start:end, ]
        if (parametersOnly == T) {
            temp = temp[, 1:sampler$setup$numPars]
            if (class(temp) == "numeric") 
                temp = as.matrix(temp)
            if (!is.null(sampler$setup$names)) 
                colnames(temp) = sampler$setup$names
        }
        else {
            if (!is.null(sampler$setup$names)) 
                colnames(temp) = c(sampler$setup$names, "Lposterior", 
                  "Llikelihood", "Lprior")
        }
        if (thin == "auto") {
            thin = max(floor(nrow(temp)/5000), 1)
        }
        if (is.null(thin) || thin == F || thin < 1 || is.nan(thin)) 
            thin = 1
        if (thin > nrow(temp)) 
            warning("thin is greater than the total number of samples!")
        if (!thin == 1) {
            sel = seq(1, dim(temp)[1], by = thin)
            temp = temp[sel, ]
        }
        if (thin == 1 && !is.null(numSamples)) {
            nSamplesPerChain <- ceiling(numSamples/length(sampler$chain))
            if (i == 1) {
                if (nSamplesPerChain * length(sampler$chain) > 
                  numSamples) 
                  warning("Due to internal chains, numSamples was rounded to the next number divisble by the number of chains.", 
                    call. = FALSE)
            }
            temp <- sampleEquallySpaced(temp, nSamplesPerChain)
        }
        if (!is.null(whichParameters)) 
            temp = temp[, whichParameters]
        out[[i]] = makeObjectClassCodaMCMC(temp, start = start, 
            end = end, thin = thin)
    }
    class(out) = "mcmc.list"
    if (coda == F) {
        out = combineChains(out)
    }
    if (coda == T) {
        out = out
    }
} else stop("sampler appears not to be of class mcmcSampler")
 --- R stacktrace ---
where 1: getSample.mcmcSampler(sampler, parametersOnly = F, ...)
where 2: getSample(sampler, parametersOnly = F, ...)
where 3: DIC(sampler)
where 4: doTryCatch(return(expr), name, parentenv, handler)
where 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 6: tryCatchList(expr, classes, parentenv, handlers)
where 7: 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 8: try(DInf <- DIC(sampler), silent = TRUE)
where 9: summary.mcmcSampler(out)
where 10: summary(out)
where 11: eval(expr, envir, enclos)
where 12: eval(expr, envir, enclos)
where 13: withVisible(eval(expr, envir, enclos))
where 14: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 15: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 16: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 17: 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 18: evaluate::evaluate(...)
where 19: 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 20: 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 21: block_exec(params)
where 22: call_block(x)
where 23: process_group.block(group)
where 24: process_group(group)
where 25: 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 26: process_file(text, output)
where 27: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, 
    encoding = encoding)
where 28: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), 
    ...)
where 29: vweave_rmarkdown(...)
where 30: engine$weave(file, quiet = quiet, encoding = enc)
where 31: doTryCatch(return(expr), name, parentenv, handler)
where 32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 33: tryCatchList(expr, classes, parentenv, handlers)
where 34: 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)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 35: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/BayesianTools.Rcheck/vign_test/BayesianTools", 
    ser_elibs = "/home/hornik/tmp/scratch/RtmpeAZC2y/file6e8d5f5cac3d.rds")

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (sampler, parametersOnly = T, coda = F, start = 1, end = NULL, 
    thin = 1, numSamples = NULL, whichParameters = NULL, includesProbabilities = F, 
    reportDiagnostics = F, ...) 
{
    if (class(sampler$chain) == "matrix") {
        if (is.null(end)) 
            end = nrow(sampler$chain)
        if (parametersOnly == T) {
            out = sampler$chain[start:end, 1:sampler$setup$numPars]
            if (class(out) == "numeric") 
                out = as.matrix(out)
            if (!is.null(sampler$setup$names)) 
                colnames(out) = sampler$setup$names
        }
        else {
            out = sampler$chain[start:end, ]
            if (!is.null(sampler$setup$names)) 
                colnames(out) = c(sampler$setup$names, "Lposterior", 
                  "Llikelihood", "Lprior")
        }
        if (thin == "auto") {
            thin = max(floor(nrow(out)/5000), 1)
        }
        if (is.null(thin) || thin == F || thin < 1 || is.nan(thin)) 
            thin = 1
        if (thin > nrow(out)) 
            warning("thin is greater than the total number of samples!")
        if (!thin == 1) {
            sel = seq(1, dim(out)[1], by = thin)
            out = out[sel, ]
        }
        if (thin == 1 && !is.null(numSamples)) {
            out <- sampleEquallySpaced(out, numSamples)
        }
        if (!is.null(whichParameters)) 
            out = out[, whichParameters]
        if (coda == T) 
            out = makeObjectClassCodaMCMC(out, start = start, 
                end = end, thin = thin)
    }
    else if (class(sampler$chain) == "mcmc.list") {
        out = list()
        for (i in 1:length(sampler$chain)) {
            if (is.null(end)) 
                end = nrow(sampler$chain[[1]])
            temp = sampler$chain[[i]][start:end, ]
            if (parametersOnly == T) {
                temp = temp[, 1:sampler$setup$numPars]
                if (class(temp) == "numeric") 
                  temp = as.matrix(temp)
                if (!is.null(sampler$setup$names)) 
                  colnames(temp) = sampler$setup$names
            }
            else {
                if (!is.null(sampler$setup$names)) 
                  colnames(temp) = c(sampler$setup$names, "Lposterior", 
                    "Llikelihood", "Lprior")
            }
            if (thin == "auto") {
                thin = max(floor(nrow(temp)/5000), 1)
            }
            if (is.null(thin) || thin == F || thin < 1 || is.nan(thin)) 
                thin = 1
            if (thin > nrow(temp)) 
                warning("thin is greater than the total number of samples!")
            if (!thin == 1) {
                sel = seq(1, dim(temp)[1], by = thin)
                temp = temp[sel, ]
            }
            if (thin == 1 && !is.null(numSamples)) {
                nSamplesPerChain <- ceiling(numSamples/length(sampler$chain))
                if (i == 1) {
                  if (nSamplesPerChain * length(sampler$chain) > 
                    numSamples) 
                    warning("Due to internal chains, numSamples was rounded to the next number divisble by the number of chains.", 
                      call. = FALSE)
                }
                temp <- sampleEquallySpaced(temp, nSamplesPerChain)
            }
            if (!is.null(whichParameters)) 
                temp = temp[, whichParameters]
            out[[i]] = makeObjectClassCodaMCMC(temp, start = start, 
                end = end, thin = thin)
        }
        class(out) = "mcmc.list"
        if (coda == F) {
            out = combineChains(out)
        }
        if (coda == T) {
            out = out
        }
    }
    else stop("sampler appears not to be of class mcmcSampler")
    if (reportDiagnostics == T) {
        return(list(chain = out, start = start, end = end, thin = thin))
    }
    else return(out)
}
<bytecode: 0x5607e1831c70>
<environment: namespace:BayesianTools>
 --- function search by body ---
Function getSample.mcmcSampler in namespace BayesianTools has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1