predict.yeo_johnson | R Documentation |
Transform new data using an already fitted Yeo-Johnson object
## S3 method for class 'yeo_johnson'
predict(object, newdata = NULL, ...)
object |
an object of class 'yeo_johnson' |
newdata |
a numeric vector of data to transform. |
... |
further arguments passed to or from other methods. |
# fit the Yeo=-Johnson transfomration on non-normal data
x <- rgamma(100, 1, 1)
hist(x)
xt <- yeo_johnson(x)
# apply the same transformation to new data
x2 <- rgamma(100, 1, 1)
hist(x2)
hist(predict(xt, newdata=x2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.