mydata[is.na(mydata)] <- NaN should work --- Samor Gandhi <samorgandhi at yahoo.com> wrote: > Hi, Is it possible to do the following > > > mydata > y x > 1 0.3 1 > 2 0.8 NA > 3 NA 0 > 4 0.2 1 > > I would like to solve > > mydata <- replace(mydata, NA, NaN) > > Thanks!