pca_table: pca_table

Description Usage Arguments Value Examples

View source: R/fct_pca_table.R

Description

A function to create a table with the values that are plotted by the pca_plot module. This function will work inside of a renderTable statement to display the data from the PCA that is done in the plot and help the user identify outlier songs.

Usage

1
pca_table(data, album_filter)

Arguments

data

A data frame from the spotifyr function ' get_artist_audio_features.' PCA will be performed on this data within the function.

album_filter

A character vector of album names that the user selects to display on the plot created by the function 'pca_plot'.

Value

TThe return value of this function is a sorted data frame. The data frame contains the values of all 9 of the principal components, as well as the album name and song name for each value. The row names are the original numbers from the input data frame.

Examples

1
pca_table(spotifyr::get_artist_audio_features('Adele'),c('25','19'))

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