tcR (version 1.1)

pca.segments: Perform PCA on segments frequency data.

Description

Perform PCA on 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, ..., .do.plot = T)

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

Arguments

.data
Either data.frame or a list of data.frame or a result obtained from freq.segments or freq.segments.2D functions.
.cast.freq.seg
If T than case freq.segments or freq.segments.2D to the supplied data.
...
Further arguments passed to prcomp.
.do.plot
If T than plot a graphic, else return a pca object.

Value

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

Examples

Run this code
# 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 DataCamp Workspace