> 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}}