pca_score: Functions for plotting pca results in score plot

Description Usage Arguments Value

View source: R/pca_score.R

Description

Functions for plotting pca results in score plot

Usage

1
2
3
pca_score(pca_data, PCs = 1:2, colour = NULL, shape = NULL,
  size = NULL, label = NULL, title = NULL, legend.ori = "vertical",
  pt.size = 3, outline = FALSE, CIgroup = NULL)

Arguments

pca_data

the PCA model output of prcomp()

PCs

numeric; vector of Principal Components to consider

colour

string; name of column to be used as the colour aesthetic

shape

string; name of column to be used as the shape aesthetic

size

string; name of column to be used as the size aesthetic

label

string; name of column to be used as the point labels

title

string; title of pca plot

legend.ori

string. c('vertical','horizontal'). Default 'vertical'

pt.size

numeric; default 3; size of points

outline

logic. Default TRUE. outline points

CIgroup

draws an ellipse based on covariance matrix at the 95 (one of the metadata columns) specifies the groupings around which ellipses should be drawn

Value

list of: p ggplot object with generated plot collected_data all the data used to plot pca data using ggplot2. can use collected_data for further customization using ggplot


schyen/somefxns documentation built on Aug. 6, 2019, 2:26 p.m.