Description Usage Arguments Value
add_pca
takes a data frame and the columns that you wish to compute
the pca values for. You can use dplyr
's select rules to pick the
columns you want or omit the ones you don't want to include. Only numeric
columns are allowed and any rows with missing values will be returned with
missing values for the PCA columns. It will append these new pca loadings to
the data frame as additional columns.
1 |
.data |
A data frame |
... |
Comma separated list of unquoted expressions. You can treat variable names like they are positions. Use positive values to select variables; use negative values to drop variables. |
new_column |
the initial name of the new columns to append. If left null then variables will just be returned with .pc and the number for the loading. |
n |
the number of princple components to return. If left null then all loadings will be returned. |
the original data frame with the new principle component columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.