Vassilis Golfinopoulos
2009-Sep-21 13:16 UTC
[R] How to handle missing values for the GeneMeta package?
Hello all, It seems that the GeneMeta passage returns NA in the respective row if any gene in the data sets to be synthesised are missing. Do you know of a way to overcome this problem? I tried using the 'impute' package to fill-in the missing values, but R crashes if 'impute' and 'GeneMeta' packages are used together. I have asked a separate question for that. Thanks Vassilis
Martin Morgan
2009-Sep-21 13:39 UTC
[R] How to handle missing values for the GeneMeta package?
Hi Vassilis -- Vassilis Golfinopoulos wrote:> Hello all, > > It seems that the GeneMeta passage returns NA in the respective row if > any gene in the data sets to be synthesised are missing. Do you know > of a way to overcome this problem? > > I tried using the 'impute' package to fill-in the missing values, but > R crashes if 'impute' and 'GeneMeta' packages are used together. I > have asked a separate question for that.Ask questions about Bioconductor packages on the Bioconductor mailing list http://bioconductor.org/docs/mailList.html so you're more likely to get informed answers. Include a reproducible example to illustrate your problem, so others can help. For instance> library(GeneMeta) > library(impute) >No 'crash' so no problem?? Martin> > Thanks > Vassilis > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Payam Minoofar
2009-Sep-22 16:01 UTC
[R] How to handle missing values for the GeneMeta package?
I am not sure if this is the solution you want, but complete.cases will remove rows that contain any NA values at all from a matrix. These lines get rid of NA values in my little function: predmat1 <<- as.matrix(predmat[complete.cases(predmat,respmat),]) respmat1 <<- as.matrix(respmat[complete.cases(predmat,respmat),]) Also, you may want to look into these other options supplied by list members: index <- apply(yourdata, 1, function(x) any( is.na<http://is.na>(x) ) ) yourdata[ !index, ] or ?na.omit Sorry if I misunderstood the problem. :) Payam __________________ Payam Minoofar, Ph.D. Scientist Meissner Filtration Products 4181 Calle Tesoro Camarillo, CA 93012 +1 805 388 9911 ext. 159 +1 805 388 5948 fax payam.minoofar at meissner.com> Hello all, > > It seems that the GeneMeta passage returns NA in the respective row if > any gene in the data sets to be synthesised are missing. Do you know > of a way to overcome this problem? > > I tried using the 'impute' package to fill-in the missing values, but > R crashes if 'impute' and 'GeneMeta' packages are used together. I > have asked a separate question for that. > > Thanks > Vassilis