Learn R Programming

tcR (version 2.2.4)

pca2euclid: Compute the Euclidean distance among principal components.

Description

Compute the Euclidean distance among principal components.

Usage

pca2euclid(.pcaobj, .num.comps = 2)

Arguments

.pcaobj

An object returned by prcomp.

.num.comps

On how many principal components compute the distance.

Value

Matrix of distances.

See Also

prcomp, pca.segments, repOverlap, permutDistTest

Examples

Run this code
# NOT RUN {
mat.ov <- repOverlap(AS_DATA, .norm = T)
mat.gen.pca <- pca.segments(AS_DATA, T, .genes = HUMAN_TRBV)
mat.ov.pca <- prcomp(mat.ov, scale. = T)
mat.gen.pca.dist <- pca2euclid(mat.gen.pca)
mat.ov.pca.dist <- pca2euclid(mat.ov.pca)
permutDistTest(mat.gen.pca.dist, list(<list of groups here>))
permutDistTest(mat.ov.pca.dist, list(<list of groups here>))
# }

Run the code above in your browser using DataLab