Error: (subscript) logical subscript too long. Help, please?
0
0
Entering edit mode
@fatima-nunez-300
Last seen 9.6 years ago
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@usal.es
Cancer genefilter Cancer genefilter • 2.7k views
ADD COMMENT

Login before adding your answer.

Traffic: 997 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6