[R] Changing zeros to NAs in a data frame
lauraholt_983 at hotmail.com
Tue Nov 16 17:31:12 CET 2004
Dear R People:
I have a data frame with some columns that are numeric and some which are
There are zeros in the numeric columns and I would like to change them to
NAs. However, there are zeros in some of the factor columns, and I would
like them to be left alone.
Is there a "global" way to do this, please? I was thinking about use the
results from "str" but am not sure.
R Version 2.0.0 Windows.
Thanks in advance.
mailto: lauraholt_983 at hotmail.com
More information about the R-help