Hello On Wed, Aug 10, 2011 at 11:41 AM, Dimitris Rizopoulos <d.rizopou...@erasmusmc.nl> wrote: > One approach is the following: > > numVars <- sapply(iris, is.numeric) > iris[numVars] <- lapply(iris[numVars], round, digits = 2) > head(iris) > That's interesting, but still doesn't do what I need. Since it's a read-only View() operation I would like to avoid at all cost modifying the original data frame. And since my data frames are relatively big, I would like to avoid generating unnecessary copies. Basically I would need round() to ignore objects that it knows it cannot handle.
Any other ideas? Thanks Liviu ______________________________________________ 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.