pcLollipop: Lollipop plotting

Description Usage Arguments Details Value Examples

View source: R/dimensionality.R

Description

Creates a set of lollipop plots for up to the first 5 principal components of a dataset.

Usage

1

Arguments

x

The data frame or tibble containing the dataset.

Details

(some code taken from https://www.r-graph-gallery.com/300-basic-lollipop-plot.html)

Value

A list of (up to 5) plots (from ggplot2) objects; each plot is a lollipop plot of the loadings of each of the (up to 5) principal components for each variable. Morover, running this function will also display the plots in a 1-column grid.

Examples

1
2
3
data=read.csv('https://jlucasmckay.bmi.emory.edu/global/bmi585/heart.csv')
data=data[,c('Age','RestBP','Chol','MaxHR','Oldpeak')]
plots=pcLollipop(data)

loublanpain/BMI585FinalProjectLouBlanpain documentation built on Dec. 21, 2021, 11:49 a.m.