Learn R Programming

tcR (version 2.2.4)

pca.segments: Perform PCA on segments frequency data.

Description

Perform PCA on gene segments frequency data for V- and J-segments and either return pca object or plot the results.

Usage

pca.segments(.data, .cast.freq.seg = T, ..., .text = T, .do.plot = T)

pca.segments.2D(.data, .cast.freq.seg = T, ..., .text = T, .do.plot = T)

Arguments

.data

Either data.frame or a list of data.frame or a result obtained from the geneUsage function.

.cast.freq.seg

if T then apply codegeneUsage to the supplied data.

...

Further arguments passed to prcomp or geneUsage.

.text

If T then plot sample names in the resulting plot.

.do.plot

if T then plot a graphic, else return a pca object.

Value

If .do.plot is T than ggplot object; else pca object.

Examples

Run this code
# NOT RUN {
# Load the twins data.
data(twb)
# Plot a plot of results of PCA on V-segments usage.
pca.segments(twb, T, scale. = T)
# }

Run the code above in your browser using DataLab