pcaColored: PCA with samples coloured by group properties

Description Usage Arguments Value

View source: R/pcaColored.R

Description

PCA with samples coloured by group properties

Usage

1
2
3
pcaColored(m, mdata, groupToPlot, cex = 0.5, plotType = "full",
  bufSpace = 0.01, legendCex = 0.8, center = TRUE, scale = TRUE,
  pal = "Dark2", ...)

Arguments

m

(matrix)

mdata

(data.frame) metadata. rownames(mdata)=colnames(m)

groupToPlot

(char) vector of metadata variables using which to colour-code samples

plotType

(char, full or point) if "full" plots sample name. If "point", simply plots a dot

legendCex

(numeric) cex for legend

center, scale

(logical) options to center/scale matrix before PCA See prcomp()

pal

(char) RColorBrewer2 palette name

bufType

(numeric) buffer around the points, by which to extend x/y lim. Increase this value to allow space to see the full sample name.

Value

No value. side effect of plotting pca graph


shraddhapai/dataExplore documentation built on March 9, 2020, 9:17 a.m.