[BioC] Help with "Error in Summary.factor(...,
na.rm = na.rm) : "max" not meaningful for factors", please?
Fátima Núñez
fnunez at usal.es
Wed Jul 2 14:27:06 MEST 2003
Hello all,
At the moment I'm trying to obtain adjusted p-values using the maxT and
minP functions on my data as described below, but when I try to
implement any of the two I obtain the error shown. I have looked the
?Summary.factor help but I have to admit I didn't quite understand it.
Could anybody please help me with this error in order to know what I'm
doing wrong?
>rmadata2$Genotype
[1] CONT CONT CONT VAV2 VAV2 VAV2
Levels: CONT VAV2
> Index1 <- which(rmadata2$Genotype=="CONT")
> Index2 <- which(rmadata2$Genotype=="VAV2")
> scores <- esApply (rmadata2, 1, function(x) {
+ tmp <-t.test(x[Index2], x[Index1], var.equal =TRUE)
+ c(mean(tmp$estimate), -diff(tmp$estimate), tmp$statistic,
tmp$p.value)
+ })
> scores <- t(scores)
> colnames(scores) <- c("a", "m", "t.test", "p.value")
> sum(scores[, 4] <= 0.05)
[1] 1130
> sum(scores[, 4] <= 0.01)
[1] 318
> tmp <- mt.rawp2adjp(scores[,4])
> adj.p.values <- tmp$adjp[order(tmp$index), -1]
> scores <- cbind(scores, adj.p.values)
> tmp <- mt.maxT(exprs(rmadata2), rmadata2$Genotype)
Error in Summary.factor(..., na.rm = na.rm) :
"max" not meaningful for factors
Thanks in advance for your help and sorry if this is not a relevant
question for BioC,
Fatima
_______
Fátima Núñez, PhD
Centre for Cancer Research (CIC)
University of Salamanca-CSIC
Campus Unamuno
37007 Salamanca
Spain
Phone: + 34 923 294802
Fax: + 34 923 294743
E-mail: fnunez at usal.es
More information about the Bioconductor
mailing list