[R] removing NA values from data frame & identification function
faheem at email.unc.edu
Thu Apr 20 02:07:38 CEST 2000
1) I have a data frame with named columns.For concreteness, let us say
that I created a data frame from the vectors fee, fi fo, fum by
giant.df <- cbind(fee, fi, fo, fum)
Now, some of the entries in fee, fi fo fum are NAs. I want to remove any
row which contains a NA, thus creating a new, smaller data frame, with the
same column names. This seems like something people would need to do all
the time, but I have been unable to think of a clean way to do it.
Actually, I'm trying to do this because step and stepAIC don't seem to
happy with handling glm objects constructed from data sets containing
NAs. It would be even cooler if this could be done at the level of
read.table, but I don't see a way to do this.
2) Is there a function to compare whether two objects are identical in
Thanks for everyone's very valuable help on this list. I'm still a raw
beginner, but perhaps getting a little less raw...
Sincerely, Faheem Mitha.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help