Error(s) in re-building vignettes:
  ...
--- re-building 'mptinr_introduction.Rnw' using knitr
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
MPTinR
 --- call from context --- 
prediction.plot(br.2htm.2, textConnection(mod_2htm_2), axis.labels = axis.labels, 
    args.plot = list(main = "Absolute deviations (frequency scale)"))
 --- call from argument --- 
if (class(results[["data"]][["observed"]]) != "list") {
    data <- results[["data"]][["observed"]]
    exp <- results[["data"]][["predicted"]]
} else {
    if (dataset == "aggregated") {
        data <- results[["data"]][["observed"]][["aggregated"]]
        exp <- results[["data"]][["predicted"]][["aggregated"]]
    }
    else {
        data <- results[["data"]][["observed"]][["individual"]][dataset, 
            ]
        exp <- results[["data"]][["predicted"]][["individual"]][dataset, 
            ]
    }
}
 --- R stacktrace ---
where 1: prediction.plot(br.2htm.2, textConnection(mod_2htm_2), axis.labels = axis.labels, 
    args.plot = list(main = "Absolute deviations (frequency scale)"))
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: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$", 
    file)) knit2pandoc else knit)(file, encoding = encoding, 
    quiet = quiet, envir = globalenv(), ...)
where 19: engine$weave(file, quiet = quiet, encoding = enc)
where 20: doTryCatch(return(expr), name, parentenv, handler)
where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 22: tryCatchList(expr, classes, parentenv, handlers)
where 23: 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 24: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/MPTinR.Rcheck/vign_test/MPTinR", 
    ser_elibs = "/tmp/RtmpQWu2Ew/file19729b7339e.rds")

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (results, model.filename, dataset = 1, absolute = TRUE, 
    spacing = 2, axis.labels = NULL, ylim, model.type = c("easy", 
        "eqn", "eqn2"), args.plot = list(), args.rect = list(), 
    args.box = list(), args.points = list(), args.labels = list(), 
    numbers = c("individual", "continuous"), pos.numbers = c("plot", 
        "axis"), args.numbers = list(), args.abline = list(), 
    abline) 
{
    tree <- .get.mpt.model(model.filename, model.type)
    categories.per.type <- vapply(tree, length, 0)
    n.trees <- length(categories.per.type)
    if (class(results[["data"]][["observed"]]) != "list") {
        data <- results[["data"]][["observed"]]
        exp <- results[["data"]][["predicted"]]
    }
    else {
        if (dataset == "aggregated") {
            data <- results[["data"]][["observed"]][["aggregated"]]
            exp <- results[["data"]][["predicted"]][["aggregated"]]
        }
        else {
            data <- results[["data"]][["observed"]][["individual"]][dataset, 
                ]
            exp <- results[["data"]][["predicted"]][["individual"]][dataset, 
                ]
        }
    }
    if (absolute) 
        y.values <- data - exp
    else {
        y.values <- data
        y.values[data != 0] <- 2 * data[data != 0] * (log(data[data != 
            0]) - log(exp[data != 0]))
    }
    x.bool <- unlist(mapply(function(x, y, spacing) rep(c(y, 
        FALSE), c(x, spacing)), categories.per.type, seq(categories.per.type), 
        spacing = spacing, SIMPLIFY = FALSE))
    x.values <- which(x.bool != 0)
    xlim <- c(1, max(x.values))
    if (missing(ylim)) 
        ylim <- c(min(y.values), max(y.values))
    def.args.plot <- list(xlab = "", ylab = "", main = "")
    args.to.plot <- c(x = list(x.values), y = list(y.values), 
        ylim = list(ylim), xaxt = "n", type = "n", args.plot, 
        def.args.plot[!names(def.args.plot) %in% names(args.plot)])
    do.call("plot", args = args.to.plot)
    mean.trees <- vector("numeric", n.trees)
    def.args.rect <- list(col = "grey", border = "transparent", 
        density = 30, angle = 45)
    args.to.rect <- c(args.rect, def.args.rect[!names(def.args.rect) %in% 
        names(args.rect)])
    for (c in seq_along(categories.per.type)) {
        tmp.args.to.rect <- c(xleft = min(which(x.bool == c)) - 
            1, ybottom = 1.5 * ylim[1], xright = max(which(x.bool == 
            c)) + 1, ytop = 1.5 * ylim[2], args.to.rect)
        do.call("rect", tmp.args.to.rect)
        mean.trees[c] <- mean(which(x.bool == c))
    }
    do.call("box", args.box)
    if (missing(abline)) 
        if (pos.numbers[1] == "axis") 
            abline <- TRUE
        else abline <- FALSE
    def.args.abline <- list(col = "darkgrey")
    args.to.abline <- c(v = list(x.values), args.abline, def.args.abline[!names(def.args.abline) %in% 
        names(args.abline)])
    if (abline) 
        do.call("abline", args.to.abline)
    def.args.points <- list(pch = 1, cex = 2.25)
    args.to.points <- c(x = list(x.values), y = list(y.values), 
        args.points, def.args.points[!names(def.args.points) %in% 
            names(args.points)])
    do.call("points", args.to.points)
    def.args.axis <- list(line = -1)
    pos.numbers <- match.arg(pos.numbers, c("plot", "axis"), 
        several.ok = TRUE)
    if (!is.null(numbers)) {
        numbers <- match.arg(numbers, c("individual", "continuous"), 
            several.ok = TRUE)
        if (numbers[1] == "individual") 
            numbers.pch <- unlist(lapply(rle(x.bool[x.bool != 
                0])[["lengths"]], seq_len))
        if (numbers[1] == "continuous") 
            numbers.pch <- seq_along(y.values)
        if (pos.numbers[1] == "plot") {
            def.args.text <- list(labels = as.character(numbers.pch), 
                cex = 0.7)
            args.to.text <- c(x = list(x.values), y = list(y.values), 
                args.numbers, def.args.text[!names(def.args.text) %in% 
                  names(args.numbers)])
            do.call("text", args.to.text)
        }
        if (pos.numbers[1] == "axis") {
            def.args.axis2 <- list(labels = numbers.pch, cex.axis = 0.6, 
                mgp = c(0, 0.3, 0))
            args.to.axis2 <- c(side = 1, at = list(x.values), 
                args.numbers, def.args.axis2[!names(def.args.axis2) %in% 
                  names(args.numbers)])
            do.call("axis", args.to.axis2)
            def.args.axis <- list(line = 1)
        }
    }
    if (is.null(axis.labels)) 
        axis.labels <- paste("Tree", seq_len(n.trees))
    args.to.axis <- c(side = 1, at = list(mean.trees), labels = list(axis.labels), 
        tick = FALSE, args.labels, def.args.axis[!names(def.args.axis) %in% 
            names(args.labels)])
    do.call("axis", args.to.axis)
    invisible(list(x = x.values, y = y.values))
}
<bytecode: 0x56069c0>
<environment: namespace:MPTinR>
 --- function search by body ---
Function prediction.plot in namespace MPTinR has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1