createPCA: createPCA

View source: R/createPCA.R

createPCAR Documentation

createPCA

Description

Creates a PCA loadings plot using ggplot.

Usage

createPCA(
  df,
  principal_components = c(1, 2),
  plots = "scores",
  cutoff = NULL,
  features = NULL
)

Arguments

df

A tidy dataframe with at least sample_id, group, feature and value columns.

principal_components

Principal components to be used as x and y axis, default is 1 and 2.

plots

Which plots should be made? 'scores', 'loadings' or 'both'.

cutoff

Numerical value used to label all features with a loading >cutoff or <-cutoff. Default NULL.

Value

A PCA loadings plot.


AslaugL/thesisToolsOmics documentation built on April 3, 2022, 8:16 p.m.