[R] How to handle missing values for the GeneMeta package?
Payam Minoofar
payam.minoofar at meissner.com
Tue Sep 22 18:01:28 CEST 2009
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
More information about the R-help
mailing list