Andrew, > x[] <- lapply(x, function(xx) { > xx[is.nan(xx)] <- NA_real_ > xx > }) > > is different from > > x <- lapply(x, function(xx) { > xx[is.nan(xx)] <- NA_real_ > xx > })
indeed, the two are different -- but some ignorance of mine is exposed. i wonder, can you explain why the two are different? is it because of (or, "is the clue...") this in the "Value:" section of : ?"[<-.data.frame" ---- For '[<-', '[[<-' and '$<-', a data frame. ---- ? cheers, Greg ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.