Skip to content
Prev 256102 / 398506 Next

transform() on selective names. Is it possible?

On Apr 7, 2011, at 9:56 AM, Juan Carlos Borr?s wrote:

            
Consider:

  whiten <- scale  # no need to re-invent the wheel
  fc <- function(dfrm, coln) transform(dfrm, coln=whiten(dfrm[coln]))
  colxy <- "x"
  z <- fc(z, colxy)  # the "[" function will interpret colxy
  z
David Winsemius, MD
West Hartford, CT