ggplot2_pca: Principal Component Analysis.

Description Usage Arguments Value Examples

View source: R/ggplot2_pca.R

Description

Principal Component Analysis.

Usage

1
ggplot2_pca(data, title, first_pc, second_pc, samples, expGroups)

Arguments

data

(compulsory) either a matrix, a DESeqTransform or a DESeqDataSet object.

title

(optional) main title of the plot and the name of the file. Default: time stamp.

first_pc

(optional) component plotted on the x-axis. Default: 1.

second_pc

(optional) component plotted on the y-axis. Default: 2.

samples

(optional) vector containing the sample names. Default: column names of data.

expGroups

(optional) vector containing the name of the experimental groups (same order as in the columns of data). no default

Value

a PDF file

Examples

1
2
dat <- matrix(rnorm(1200), ncol=6)
ggplot2_pca(dat, first_pc=1, second_pc=3, samples=1:6, expGroups=rep(c("A", "B"), 3), title="test")

sarahbonnin/ggplot2Functions documentation built on Nov. 5, 2019, 6:14 a.m.