[R-lang] Re: How to handle missing data when I try to log-transform my data

Daniel Ezra Johnson danielezrajohnson@gmail.com
Wed Jun 23 12:02:14 PDT 2010


scott wrote:
The following does NOT work:
data$RT[data$RT < 100] <- NA
The following DOES work:
is.na(data$RT[data$RT < 100]) <- TRUE

steve wrote:
By the way, there is an easy syntax for this in R (that I didn't know
about for a while):
d$rt[d$rt < 100] <- NA

my own experience backs steve in this controversy.
the simpler command does seem to work.

dan


More information about the ling-r-lang-L mailing list