#' Plots Basketball PCA
#'
#'
#'
#' @export
plot_pca <- function(data, xcol, ycol, d){
data <- as.data.frame(pca_bball(data, d1 = d))
data %>%
ggplot(aes(x = data[,xcol], y = data[,ycol], color = conference, shape = as.factor(tournament))) +
geom_point() +
xlab(xcol) +
ylab(ycol)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.