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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: radSensitivitySig
> ### Title: Creates a signature representing the association between gene
> ###   expression (or other molecular profile) and radiation dose response,
> ###   for use in radiation sensitivity analysis.
> ### Aliases: radSensitivitySig
> 
> ### ** Examples
> 
> data(Cleveland_small)
> rad.sensitivity <- radSensitivitySig(Cleveland_small, mDataType="rna",
+              nthread=1, features = fNames(Cleveland_small, "rna")[1],
+              radiation.types=radiationTypes(Cleveland_small))
Computing radiation sensitivity signatures...
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
RadioGx
 --- call from context --- 
rankGeneDrugSensitivity(data = expr, drugpheno = dd, type = type, 
    batch = batch, single.type = FALSE, standardize = standardize, 
    nthread = nthread, verbose = verbose)
 --- call from argument --- 
if (class(drugpheno) != "data.frame") {
    drugpheno <- as.data.frame(drugpheno)
}
 --- R stacktrace ---
where 1: rankGeneDrugSensitivity(data = expr, drugpheno = dd, type = type, 
    batch = batch, single.type = FALSE, standardize = standardize, 
    nthread = nthread, verbose = verbose)
where 2: FUN(X[[i]], ...)
where 3: lapply(X = X, FUN = FUN, ...)
where 4: parallel::mclapply(splitix, function(x, drugn, expr, drugpheno, 
    type, batch, standardize, nthread) {
    res <- NULL
    for (i in drugn[x]) {
        dd <- lapply(drugpheno, function(x) x[, i])
        dd <- do.call(cbind, dd)
        colnames(dd) <- seq_len(ncol(dd))
        if (!is.na(sensitivity.cutoff)) {
            dd <- factor(ifelse(dd > sensitivity.cutoff, 1, 0), 
                levels = c(0, 1))
        }
        rr <- rankGeneDrugSensitivity(data = expr, drugpheno = dd, 
            type = type, batch = batch, single.type = FALSE, 
            standardize = standardize, nthread = nthread, verbose = verbose)
        res <- c(res, list(rr$all))
    }
    names(res) <- drugn[x]
    return(res)
}, drugn = drugn, expr = t(molecularProfiles(rSet, mDataType)[features, 
    , drop = FALSE]), drugpheno = drugpheno.all, type = type, 
    batch = batch, nthread = nthread, standardize = standardize)
where 5: radSensitivitySig(Cleveland_small, mDataType = "rna", nthread = 1, 
    features = fNames(Cleveland_small, "rna")[1], radiation.types = radiationTypes(Cleveland_small))

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (data, drugpheno, type, batch, single.type = FALSE, 
    standardize = "SD", nthread = 1, verbose = FALSE) 
{
    if (nthread != 1) {
        availcore <- parallel::detectCores()
        if (missing(nthread) || nthread < 1 || nthread > availcore) {
            nthread <- availcore
        }
    }
    if (is.null(dim(drugpheno))) {
        drugpheno <- data.frame(drugpheno)
    }
    else if (class(drugpheno) != "data.frame") {
        drugpheno <- as.data.frame(drugpheno)
    }
    if (missing(type) || all(is.na(type))) {
        type <- array("other", dim = nrow(data), dimnames = list(rownames(data)))
    }
    if (missing(batch) || all(is.na(batch))) {
        batch <- array(1, dim = nrow(data), dimnames = list(rownames(data)))
    }
    if (any(c(nrow(drugpheno), length(type), length(batch)) != 
        nrow(data))) {
        stop("length of drugpheno, type, duration, and batch should be equal to the number of rows of data!")
    }
    rownames(drugpheno) <- names(type) <- names(batch) <- rownames(data)
    res <- NULL
    utype <- sort(unique(as.character(type)))
    ltype <- list(all = utype)
    if (single.type) {
        ltype <- c(ltype, as.list(utype))
        names(ltype)[-1] <- utype
    }
    res <- NULL
    ccix <- complete.cases(data, type, batch, drugpheno)
    nn <- sum(ccix)
    if (!any(unlist(lapply(drugpheno, is.factor)))) {
        if (ncol(drugpheno) > 1) {
            nc <- lapply(1:ncol(drugpheno), function(i) {
                est <- paste("estimate", i, sep = ".")
                se <- paste("se", i, sep = ".")
                tstat <- paste("tstat", i, sep = ".")
                nc <- c(est, se, tstat)
                return(nc)
            })
            nc <- c(nc, n = nn, fstat = NA, pvalue = NA, "fdr")
        }
        else {
            nc <- c("estimate", "se", "n", "tstat", "fstat", 
                "pvalue", "df", "fdr")
        }
    }
    else {
        nc <- c("estimate", "se", "n", "pvalue", "fdr")
    }
    for (ll in 1:length(ltype)) {
        iix <- !is.na(type) & is.element(type, ltype[[ll]])
        data.not.all.na <- apply(data[iix, , drop = FALSE], 1, 
            function(x) {
                any(!is.na(x))
            })
        drugpheno.not.all.na <- apply(drugpheno[iix, , drop = FALSE], 
            1, function(x) {
                any(!is.na(x))
            })
        type.not.all.na <- sapply(type[iix], function(x) {
            !is.na(x)
        })
        batch.not.all.na <- sapply(batch[iix], function(x) {
            !is.na(x)
        })
        ccix <- data.not.all.na & drugpheno.not.all.na & type.not.all.na & 
            batch.not.all.na
        if (sum(ccix) < 3) {
            rest <- list(matrix(NA, nrow = ncol(data), ncol = length(nc), 
                dimnames = list(colnames(data), nc)))
            res <- c(res, rest)
        }
        else {
            splitix <- parallel::splitIndices(nx = ncol(data), 
                ncl = nthread)
            splitix <- splitix[sapply(splitix, length) > 0]
            mcres <- parallel::mclapply(splitix, function(x, 
                data, type, batch, drugpheno, standardize) {
                res <- t(apply(data[, x, drop = FALSE], 2, geneDrugSensitivity, 
                  type = type, batch = batch, drugpheno = drugpheno, 
                  verbose = verbose, standardize = standardize))
                return(res)
            }, data = data[iix, , drop = FALSE], type = type[iix], 
                batch = batch[iix], drugpheno = drugpheno[iix, 
                  , drop = FALSE], standardize = standardize, 
                mc.cores = nthread)
            rest <- do.call(rbind, mcres)
            rest <- cbind(rest, fdr = p.adjust(rest[, "pvalue"], 
                method = "fdr"))
            res <- c(res, list(rest))
        }
    }
    names(res) <- names(ltype)
    return(res)
}
<bytecode: 0x55789993eb18>
<environment: namespace:RadioGx>
 --- function search by body ---
Function rankGeneDrugSensitivity in namespace RadioGx has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1