[R] Utility function to apply a scale object on another data frame

2011-07-16 Thread E- Cognium
Hi Everyone, I would like to scale a data frame and then using the same scaling parameters scale on another data frame. This will be helpful in scaling the test dataset based on train dataset's scaling parameters. I couldn't find any utility functions that do this. Any suggestions on how to approa

Re: [R] Utility function to apply a scale object on another data frame

2011-07-17 Thread E- Cognium
(x, 2L, attr(trained, "scaled:scale"), FUN = "/") >  attr(x, "scaled:center") <- attr(trained, "scaled:center") >  attr(x, "scaled:scale") <- attr(trained, "scaled:scale") >  return(x) > } > > ## scale y from s >