> myData[myData$var1==5;"var1"]<-NA             # recode value "5" into "NA"
try 
myData[!is.na(myData$var1) & myData$var1==5;"var1"]<-NA
or, more simply,
myData$var1[myData$var1==5]<-NA

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
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.

Reply via email to