scree_base: Scree plot with Rbase

Description Usage Arguments Details Examples

View source: R/lipidome_comparison_pca.R

Description

'scree_base' takes a prcomp element and diplays the percentage and the cummulative percentage of variance of variance explained by the principal components in a barplot.

Usage

1
2
3
4
5
6
scree_base(
  input_df,
  title = c("Scree plot", "Cummulative scree plot"),
  scale = FALSE,
  out_path = "none"
)

Arguments

input_df

data frame or matrix.

title

vector of strings. Main titles for both plots. Default: c("Scree plot", "Cummulative scree plot")

scale

bool. Apply scaling when erforming PCA. Default = FALSE.

out_path

string. Path to save plot to png. If out_path is empty, the plot is printed to the device.

Details

This function takes a prcomp element (i.e. an element generated by the base::prcomp function), and displays the percentage of variance and the cummulative percentage of variance explained by each principal component in a dot- and line graph.

Examples

1

lisaschneider0509/lipidomeComparisonR documentation built on Aug. 12, 2020, 12:52 a.m.