[BioC] Error: (subscript) logical subscript too long. Help, please?

Fátima Núñez fnunez at usal.es
Tue Jun 24 17:27:14 MEST 2003


Hello all,

First of all I'd like to apologise in advance because this is probably a
very naïve question.

I am trying to get to grips with R and I am trying to practice on my own
data using some of the scripts we were given in the Milan BioC course.

What I report below is the error message I get when I try to run this
simple script to transform the data:


> X <- exprs(data)
> X[X < 20] <- 20
> X[X > 8000] <- 8000
> mmfilt <- function (r = 5, d = 500, na.rm =TRUE) {
+                function(x) {
+                     minval <- min(x, na.rm = na.rm)
+                     maxval <- max(x, na.rm = na.rm)
+                      (maxval/minval > r) && (maxval - minval > d)
+      }
+ }
> mmfun <- mmfilt()
> fffun <- filterfun(mmfun)
> sub <- genefilter (X, fffun)
> sum(sub)
[1] 11478
> X <- X [sub, ]
> X <- log2(X)
> datasub <- data [sub, ]
Error in data[sub, ] : (subscript) logical subscript too long


Does anybody have any idea as to what may be happening here?

Thanks in advance and sorry if this is a trivial question,

Fátima
_______
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