step_pca
step_pca.Rd
`StepPca` Does PCA for a set of columns. This currently is an in house function. Use at your own risk!
Usage
step_pca(
.rec,
terms,
na_rm = TRUE,
n_comp = 3,
center = TRUE,
scale = TRUE,
role = "predictor",
...
)
Arguments
- .rec
the R6 recipe object.
- terms
the unquoted names of the variables to use or a selector function. terms replaces the `...` of the recipes package but requires variables to be included within `c()`. For example to include variables x and y you would write `c(x,y)` in the hydrorecipes package.
- na_rm
logical - should NA values be removed from calculations
- n_comp
number of components to retain
- center
center values before PCA
- scale
scale values before PCA
- role
character - the name of the role
- ...
additional arguments