predict.yeo_johnson: Transform new data using an already fitted Yeo-Johnson object

View source: R/yeo_johnson.R

predict.yeo_johnsonR Documentation

Transform new data using an already fitted Yeo-Johnson object

Description

Transform new data using an already fitted Yeo-Johnson object

Usage

## S3 method for class 'yeo_johnson'
predict(object, newdata = NULL, ...)

Arguments

object

an object of class 'yeo_johnson'

newdata

a numeric vector of data to transform.

...

further arguments passed to or from other methods.

Examples

# 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))

jiho/morphr documentation built on May 11, 2024, 9:32 p.m.