Try this also: is.na(x) <- x == 0
On Fri, Jun 12, 2009 at 6:59 AM, Robert Kinley <kinley_rob...@lilly.com>wrote: > something like ... > > > x<-c(1,2,3,0,5,6,0) > > is.na(x[x==0])<-T > > x > [1] 1 2 3 NA 5 6 NA > > ~~~~~~~~~~~~~~~~ > Robert Kinley > > ~~~~~~~~~~~~~~~~ > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@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.