Running examples in 'rocc-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: p.rocc
> ### Title: Making predictions using the ROC based classifier
> ### Aliases: p.rocc
> ### Keywords: classif
> 
> ### ** Examples
> 
> #### tr.rocc
> 
> ### Random Dataset and phenotype
> set.seed(100)
> ## Dataset should be a matrix
> g <- matrix(rnorm(1000*25),ncol=25)
> rownames(g) <- paste("Gene",1:1000,sep="_")
> colnames(g) <- paste("Sample",1:25,sep="_")
> ## Phenotype should be a factor with levels 0 and 1: 
> out <- as.factor(sample(c(0:1),size=25,replace=TRUE))
> 
> predictor <- tr.rocc (g,out,xgenes=50)
> 
> ## find classifier specification:
> predictor$positiv
 [1] "Gene_825" "Gene_450" "Gene_143" "Gene_81"  "Gene_239" "Gene_246"
 [7] "Gene_624" "Gene_628" "Gene_621" "Gene_839" "Gene_853" "Gene_106"
[13] "Gene_311" "Gene_738" "Gene_751" "Gene_200" "Gene_313" "Gene_650"
[19] "Gene_100" "Gene_177" "Gene_286"
> predictor$negativ
 [1] "Gene_779" "Gene_991" "Gene_970" "Gene_98"  "Gene_567" "Gene_228"
 [7] "Gene_36"  "Gene_385" "Gene_871" "Gene_695" "Gene_347" "Gene_798"
[13] "Gene_77"  "Gene_101" "Gene_164" "Gene_631" "Gene_828" "Gene_500"
[19] "Gene_654" "Gene_282" "Gene_348" "Gene_434" "Gene_692" "Gene_728"
[25] "Gene_309" "Gene_502" "Gene_928" "Gene_31"  "Gene_230"
> predictor$cutoffvalue
[1] -0.117152
> 
> 
> 
> 
> #### p.rocc
> 
> ### just an example: classification of the training samples
> p.rocc(trocc=predictor,newsample=g)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
rocc
 --- call from context --- 
p.rocc(trocc = predictor, newsample = g)
 --- call from argument --- 
if (class(newsample) != "matrix") warning("newsample should be a matrix (with genes as rows and samples as columns)")
 --- R stacktrace ---
where 1: p.rocc(trocc = predictor, newsample = g)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (trocc, newsample) 
{
    if (class(trocc) != "trocc") 
        stop("Object has to be a trocc object obtained from tr.rocc function")
    if (class(newsample) != "matrix") 
        warning("newsample should be a matrix (with genes as rows and samples as columns)")
    if (is.null(colnames(newsample))) 
        warning("Colnames for newsample with sample names are missing")
    if (class(newsample) != "matrix") 
        newsample <- as.matrix(newsample)
    if (is.null(rownames(newsample))) 
        stop("Rownames for newsample with gene names are missing")
    if (table(trocc$genes %in% rownames(newsample))["TRUE"] != 
        length(trocc$genes)) 
        stop("newsample does not contain all genes of classifier trocc object")
    pr <- as.numeric(rep(NA, length(colnames(newsample))))
    pr <- factor(pr, level = c(0, 1))
    names(pr) <- colnames(newsample)
    for (v in 1:dim(newsample)[2]) {
        plusn <- newsample[trocc$positiv, v]
        minusn <- newsample[trocc$negativ, v]
        minustoplusn <- minusn * -1
        newdata <- mean(c(plusn, minustoplusn))
        ifelse(newdata > trocc$cutoffvalue, pr[v] <- 1, pr[v] <- 0)
    }
    KRAVAL <- pr
    return(KRAVAL)
}
<bytecode: 0x3acee58>
<environment: namespace:rocc>
 --- function search by body ---
Function p.rocc in namespace rocc has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1