pca_plot: pca_plot

Description Usage Arguments Value Examples

View source: R/fct_pca_plot.R

Description

A plotting function that receives a data frame and runs PCA on it to produce a formatted ggplot.

Usage

1
pca_plot(data, album_filter, loading = FALSE, cluster = FALSE)

Arguments

data

A filtered dataframe from the spotifyr function get_artist_audio_features.

album_filter

A list of albums to perform the PCA on and plot.

loading

A logical value to specify whether to plot the loadings or not

cluster

A logical value to specify whether to plot the clusters or not

Value

Returns a formatted ggplot.

Examples

1
2
pca_plot(spotifyr::get_artist_audio_features('Morgan Wallen'), 
c('Dangerous: The Double Album', 'If I Know Me'), TRUE, TRUE)

gtdoering/harmony documentation built on Dec. 20, 2021, 1:47 p.m.