Method to initialize transformations (e.g., scaling, centering) for hyperdesign objects. Each block in the hyperdesign gets its own transformation object.
Usage
# S3 method for class 'hyperdesign'
init_transform(x, X, ...)Value
A hyperdesign with transformed data and a preproc attribute
containing the fitted preprocessing objects
See also
Other hyperdesign functions:
as_multidesign(),
design.hyperdesign(),
df_to_hyperdesign(),
hyperdesign.list(),
subset.hyperdesign(),
xdata.hyperdesign()
Examples
if (FALSE) { # \dontrun{
d1 <- multidesign(matrix(rnorm(10*5), 10, 5),
data.frame(cond = rep(c("A","B"), 5)))
d2 <- multidesign(matrix(rnorm(10*5), 10, 5),
data.frame(cond = rep(c("A","B"), 5)))
hd <- hyperdesign(list(d1, d2))
hd_transformed <- init_transform(hd, recipes::recipe(~ ., data = as.data.frame(d1$x)))
} # }