#' PCA
#' generates the PCA from the provided numeric data
#' @param my_data_clean_PCA data including all numeric featrurs ready for the PCA
#'
#' @return pca_fit
#' @export
#'
#' @examples
PCA <- function(my_data_clean_PCA){
pca_fit <- my_data_clean_PCA %>%
select(where(is.numeric)) %>% # retain only numeric columns
prcomp(scale = TRUE) # do PCA on scaled data
return(pca_fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.