Error(s) in re-building vignettes:
  ...
--- re-building 'example.Rmd' using rmarkdown
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
bcROCsurface
 --- call from context --- 
ROCs(method = "full", T = EOC$CA125, Dvec = Dvec.full, ncp = 30, 
    ellipsoid = TRUE, cpst = c(-0.56, 2.31))
 --- call from argument --- 
if (class(Dvec) != "matrix" | ncol(Dvec) != 3 | !all(is.element(na.omit(Dvec), 
    c(0, 1)))) stop("variable \"Dvec\" must be a binary matrix with 3 columns")
 --- R stacktrace ---
where 1: ROCs(method = "full", T = EOC$CA125, Dvec = Dvec.full, ncp = 30, 
    ellipsoid = TRUE, cpst = c(-0.56, 2.31))
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(), 
    output_dir = getwd(), ...)
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)
    }
    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 26: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/bcROCsurface.Rcheck/vign_test/bcROCsurface", 
    ser_elibs = "/tmp/Rtmpv0EDy4/file459c7b481eb5.rds")

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (method = "full", T, Dvec, V, A = NULL, rhoEst = NULL, 
    piEst = NULL, ncp = 100, plot = TRUE, ellipsoid = FALSE, 
    cpst = NULL, level = 0.95, sur.col = c("gray40", "green"), 
    BOOT = FALSE, nR = 250, parallel = FALSE, ncpus = ifelse(parallel, 
        detectCores()/2, NULL), ...) 
{
    methodtemp <- substitute(me, list(me = method))
    okMethod <- c("full", "fi", "msi", "ipw", "spe", "knn")
    if (length(methodtemp) > 1) 
        stop(gettextf("Please, choose one method from %s", paste(sQuote(okMethod), 
            collapse = ", ")), domain = NA)
    if (!is.character(methodtemp)) 
        methodtemp <- deparse(methodtemp)
    if (!is.element(methodtemp, okMethod)) {
        stop(gettextf("the required method \"%s\" is not available; it should be one of %s", 
            methodtemp, paste(sQuote(okMethod), collapse = ", ")), 
            domain = NA)
    }
    if (missing(T)) 
        stop("argument \"T\" is missing \n")
    if (class(T) != "numeric" | any(is.na(T))) 
        stop("variable \"T\" must be a numeric vector and not include NA values")
    name_diagnostic <- substitute(T)
    if (!is.character(name_diagnostic)) {
        name_diagnostic <- deparse(name_diagnostic)
    }
    name_diagnostic <- unlist(strsplit(name_diagnostic, NULL))
    if (any(name_diagnostic %in% c("$"))) {
        id.name <- which(name_diagnostic %in% c("$"))
        name_diagnostic <- paste(name_diagnostic[(id.name[1] + 
            1):length(name_diagnostic)], collapse = "")
    }
    else name_diagnostic <- paste(name_diagnostic, collapse = "")
    method_name <- toupper(methodtemp)
    if (missing(Dvec)) 
        stop("argument \"Dvec\" is missing \n")
    if (class(Dvec) != "matrix" | ncol(Dvec) != 3 | !all(is.element(na.omit(Dvec), 
        c(0, 1)))) 
        stop("variable \"Dvec\" must be a binary matrix with 3 columns")
    if (length(T) != nrow(Dvec)) 
        stop(gettextf("arguments imply differing number of observation: %d", 
            length(T)), gettextf(", %d", nrow(Dvec)), domain = NA)
    Dvec.flag <- any(is.na(Dvec))
    if (ellipsoid & is.null(cpst)) 
        stop("argument \"cpst\" is required to construct the ellipsoidal confidence region of TCFs")
    if (!is.null(rhoEst)) {
        if (!is.element(class(rhoEst), c("prob_dise", "prob_dise_knn"))) 
            stop("\"rhoEst\" not a result of rhoMlogit or rhoKNN \n")
        if (is.element(class(rhoEst), c("prob_dise_knn"))) {
            if (is.null(rhoEst$K)) 
                stop("The \"rhoEst\" is a list and contains results of rhoKNN corresponding to many K! \n Please, choose one result of them \n")
        }
    }
    if (!is.null(piEst)) {
        if (!is.element(class(piEst), c("prob_veri"))) 
            stop("\"piEst\" not a result of psglm \n")
    }
    if (missing(V)) {
        if (methodtemp != "full" | Dvec.flag) 
            stop("argument \"V\" is missing, in addition, the method is not \"full\" or argument \"Dvec\" includes NA")
        cat("Hmm, look likes the full data\n")
        cat("Number of observation:", length(T), "\n")
        cat("The verification status is not available\n")
        cat("You are working on FULL or Complete Case approach\n")
        cat("The diagnostic test:", name_diagnostic, "\n")
        cat("Processing .... \n")
        flush.console()
        V <- NULL
    }
    else {
        if (all(V == 0) | !all(is.element(V, c(0, 1)))) 
            stop("There are mistakes in \"V\". Please, check your input and see whether it is correct or not")
        if (nrow(Dvec) != length(V) | length(T) != length(V)) 
            stop(gettextf("arguments imply differing number of observation: %d", 
                length(T)), gettextf(", %d", nrow(Dvec)), domain = NA)
        if (all(V == 1)) {
            if (methodtemp != "full" | Dvec.flag) 
                stop("Please, check your inputs and see whether they are correct or not.\n If you want to estimate Complete Case approach, please, remove the missing values in the \n data set and try again with the option of \"full\" method.")
            cat("Hmm, look likes the full data\n")
            cat("Number of observation:", length(T), "\n")
            cat("All subjects underwent the verification process\n")
            cat("You are working on FULL or Complete Case approach\n")
            cat("The diagnostic test:", name_diagnostic, "\n")
            cat("Processing .... \n")
            flush.console()
        }
        else {
            rv <- mean(V)
            if (!Dvec.flag) {
                cat("Warning: There are no NA values in variable Dvec, while", 
                  paste(round(rv * 100), "%", sep = ""), "of the subjects receive disease verification. \n")
                cat("BE CAREFULL OF YOUR INPUT AND RESULTS \n")
                cat("Number of observation:", length(T), "\n")
                cat("You required estimate ROC surface using", 
                  method_name, "approach \n")
                cat("The diagnostic test:", name_diagnostic, 
                  "\n")
                cat("Processing .... \n")
                flush.console()
            }
            else {
                cat("Hmm, look likes the incomplete data\n")
                cat("Number of observation:", length(T), "\n")
                cat(paste(round(rv * 100), "%", sep = ""), "of the subjects receive disease verification. \n")
                cat("You required estimate ROC surface using", 
                  method_name, "approach \n")
                cat("The diagnostic test:", name_diagnostic, 
                  "\n")
                if (ellipsoid) {
                  cat("The ellipsoidal confidence region(s) of TCFs are also constructed \n")
                  if (!is.matrix(cpst) & !is.vector(cpst)) 
                    stop("The cut points should be a vector, which has two elements, or matrix, which has two columns.")
                  if (is.vector(cpst)) {
                    if (length(cpst) != 2 | cpst[1] > cpst[2]) 
                      stop("The first cut point must be less than the second one.")
                  }
                  if (is.matrix(cpst)) {
                    if (ncol(cpst) != 2 | any(cpst[, 1] > cpst[, 
                      2])) 
                      stop("the first column must be less than or equal to the second column.")
                  }
                }
                cat("Processing .... \n")
                flush.console()
            }
        }
    }
    cp <- c(-Inf, seq(min(T), max(T), length.out = ncp - 2), 
        Inf)
    cp1 <- rep(cp, seq(ncp - 1, 0, by = -1))
    cp2 <- c()
    for (i in 1:(ncp - 1)) {
        cp2 <- c(cp2, cp[-c(1:i)])
    }
    cpoint <- cbind(cp1, cp2)
    ROCpoint <- ROCs.tcf(method = methodtemp, T = T, Dvec = Dvec, 
        V = V, rhoEst = rhoEst, piEst = piEst, cps = cpoint)
    ROCpoint <- matrix(unlist(ROCpoint), ncol = 3, byrow = TRUE)
    colnames(ROCpoint) <- c("TCF1", "TCF2", "TCF3")
    rownames(ROCpoint) <- paste("(", round(cp1, 3), " , ", round(cp2, 
        3), ")", sep = "")
    ct1 <- numeric(ncp - 1)
    for (i in 1:(ncp - 1)) {
        ct1[i] <- i * ncp - i * (i + 1)/2
    }
    tcf1 <- matrix(ROCpoint[ct1, 1], ncp - 1, ncp - 1, byrow = FALSE)
    tcf3 <- matrix(ROCpoint[1:(ncp - 1), 3], ncp - 1, ncp - 1, 
        byrow = TRUE)
    tcf2 <- matrix(0, nrow = ncp - 1, ncol = ncp - 1)
    tcf2[lower.tri(tcf2, diag = TRUE)] <- ROCpoint[, 2]
    tcf2 <- t(tcf2)
    res <- list()
    res$vals <- ROCpoint
    res$cpoint <- cpoint
    res$ncp <- ncp
    if (plot) {
        open3d()
        par3d(windowRect = 50 + c(0, 0, 640, 640))
        plot3d(0, 0, 0, type = "n", box = FALSE, xlab = " ", 
            ylab = " ", zlab = " ", xlim = c(0, 1), ylim = c(0, 
                1), zlim = c(0, 1), ...)
        surface3d(tcf1, tcf3, tcf2, col = sur.col[1], alpha = 0.5, 
            ...)
        if (any(c("full", "fi", "msi", "ipw", "spe") %in% methodtemp)) {
            title_plot <- paste(toupper(methodtemp), "estimator")
        }
        if ("knn" %in% methodtemp) {
            title_plot <- paste(rhoEst$K, "NN-", switch(rhoEst$type, 
                eucli = "Euclidean", manha = "Manhattan", canber = "Canberra", 
                lagran = "Lagrange", mahala = "Mahalanobis"), 
                sep = "")
        }
        title3d(main = title_plot, xlab = "TCF1", ylab = "TCF3", 
            zlab = "TCF2", line = 3)
        play3d(spin3d(axis = c(0, 0, 1), rpm = 12.25), duration = 2)
        play3d(spin3d(axis = c(0, 1, 0), rpm = 0.3), duration = 2)
    }
    if (ellipsoid) {
        shade.ellips <- function(orgi, sig, lev) {
            t1 <- sig[2, 2]
            sig[2, 2] <- sig[3, 3]
            sig[3, 3] <- t1
            t1 <- sig[1, 2]
            sig[1, 2] <- sig[1, 3]
            sig[1, 3] <- t1
            sig[lower.tri(sig)] <- sig[upper.tri(sig)]
            ellips <- ellipse3d(sig, centre = orgi[c(1, 3, 2)], 
                t = sqrt(qchisq(lev, 3)))
            return(ellips)
        }
        res$cpst <- cpst
        if (is.vector(cpst)) {
            tcf.orgi <- ROCs.tcf(method = methodtemp, T = T, 
                Dvec = Dvec, V = V, rhoEst = rhoEst, piEst = piEst, 
                cps = cpst)
            tcf.sig <- asyCovTCF(tcf.orgi, T = T, Dvec = Dvec, 
                V = V, rhoEst = rhoEst, piEst = piEst, BOOT = BOOT, 
                nR = nR, parallel = parallel, ncpus = ncpus)
            sig.test <- rcond(tcf.sig)
            res$tcf <- tcf.orgi
            if (sig.test < .Machine$double.eps) {
                cat("The asymptotic variance-covariance matrix of TCFs at the cut point", 
                  paste("(", cpst[1], ", ", cpst[2], ")", sep = ""), 
                  "is not singular!\n")
                cat("The ellipsoidal confidence region is not available!\n")
                if (!BOOT & methodtemp != "full") 
                  cat("Try again with bootstrap process!\n")
                plot3d(tcf.orgi[1], tcf.orgi[3], tcf.orgi[2], 
                  type = "s", col = "red", radius = 0.01, add = TRUE, 
                  ...)
                res$message <- 0
            }
            else {
                res$message <- 1
                ellip.tcf <- shade.ellips(tcf.orgi, tcf.sig, 
                  level)
                plot3d(ellip.tcf, box = FALSE, col = sur.col[2], 
                  alpha = 0.5, xlim = c(0, 1), ylim = c(0, 1), 
                  zlim = c(0, 1), xlab = " ", ylab = " ", zlab = " ", 
                  add = TRUE, ...)
                plot3d(tcf.orgi[1], tcf.orgi[3], tcf.orgi[2], 
                  type = "s", col = "red", radius = 0.01, add = TRUE, 
                  ...)
            }
        }
        if (is.matrix(cpst)) {
            res$tcf <- matrix(0, nrow = nrow(cpst), ncol = 3, 
                dimnames = list(paste("(", round(cpst[, 1], 3), 
                  " , ", round(cpst[, 2], 3), ")", sep = ""), 
                  c("TCF1", "TCF2", "TCF3")))
            res$message <- numeric(nrow(cpst))
            for (i in 1:nrow(cpst)) {
                tcf.orgi <- ROCs.tcf(method = methodtemp, T = T, 
                  Dvec = Dvec, V = V, rhoEst = rhoEst, piEst = piEst, 
                  cps = cpst[i, ])
                tcf.sig <- asyCovTCF(tcf.orgi, T = T, Dvec = Dvec, 
                  V = V, rhoEst = rhoEst, piEst = piEst, BOOT = BOOT, 
                  nR = nR, parallel = parallel, ncpus = ncpus)
                sig.test <- rcond(tcf.sig)
                res$tcf[i, ] <- tcf.orgi
                if (sig.test < .Machine$double.eps) {
                  cat("The asymptotic variance-covariance matrix of TCFs at the cut points", 
                    paste("(", cpst[i, 1], ", ", cpst[i, 2], 
                      ")", sep = ""), "is not singular!\n")
                  cat("The ellipsoidal confidence region is not available!\n")
                  if (!BOOT & methodtemp != "full") 
                    cat("Try again with bootstrap process!\n")
                  plot3d(tcf.orgi[1], tcf.orgi[3], tcf.orgi[2], 
                    type = "s", col = "red", radius = 0.01, add = TRUE, 
                    ...)
                  res$message[i] <- 0
                }
                else {
                  res$message[i] <- 1
                  ellip.tcf <- shade.ellips(tcf.orgi, tcf.sig, 
                    level)
                  plot3d(ellip.tcf, box = FALSE, col = sur.col[2], 
                    alpha = 0.5, xlim = c(0, 1), ylim = c(0, 
                      1), zlim = c(0, 1), xlab = " ", ylab = " ", 
                    zlab = " ", add = TRUE, ...)
                  plot3d(tcf.orgi[1], tcf.orgi[3], tcf.orgi[2], 
                    type = "s", col = "red", radius = 0.01, add = TRUE, 
                    ...)
                }
            }
        }
    }
    cat("DONE\n")
    cat("===============================================================\n")
    selec.ord <- order(rowSums(ROCpoint) - 1, decreasing = TRUE)
    cat("Some values of TCFs:\n")
    print(ROCpoint[selec.ord[1:6], ], 3)
    cat("\n")
    if (ellipsoid) {
        cat("Some information for Ellipsoidal Confidence Region(s):\n")
        cat("Confidence level:", level, "\n")
        if (is.vector(cpst)) {
            cat("TCFs at", paste("(", cpst[1], ", ", cpst[2], 
                ")", sep = ""), "are:\n")
            temp <- tcf.orgi
            attributes(temp) <- NULL
            names(temp) <- c("TCF1", "TCF2", "TCF3")
            print(temp, 3)
        }
        if (is.matrix(cpst)) {
            colnames(res$tcf) <- c("TCF1", "TCF2", "TCF3")
            rownames(res$tcf) <- paste("(", round(cpst[, 1], 
                3), " , ", round(cpst[, 2], 3), ")", sep = "")
            cat("TCFs at", rownames(res$tcf), "are:\n")
            print(res$tcf, 3)
        }
    }
    cat("===============================================================\n")
    invisible(res)
}
<bytecode: 0x664e768>
<environment: namespace:bcROCsurface>
 --- function search by body ---
Function ROCs in namespace bcROCsurface has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 92-95 (example.Rmd) 
Error: processing vignette 'example.Rmd' failed with diagnostics:
the condition has length > 1
--- failed re-building 'example.Rmd'

SUMMARY: processing the following file failed:
  'example.Rmd'

Error: Vignette re-building failed.
Execution halted