cnlp_utils_pca | R Documentation |
Takes a matrix and returns a data frame with the top principal components extracted. This is a simple but powerful technique for visualizing a corpus of documents.
cnlp_utils_pca(x, k = 2, center = TRUE, scale = TRUE)
x |
a matrix object to pass to |
k |
integer. The number of components to include in the output. |
center |
logical. Should the data be centered? |
scale |
logical. Should the data be scaled? Note that this will
need to be set to false if any columns in |
a data frame object containing the top k
principal
components of the data in x.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.