pca {ProcMod} | R Documentation |
Project a set of points in a euclidean space (PCA).
Description
Project a set of points defined by a set of numeric variables in
an eucleadean space using the pricipal componant analysis.
This function is mainly a simplified
interface on the prcomp
function using as
much as possible dimensions to keep all the variation. The aims of this
PCA being only to project point in an orthogonal space therefore
without any correlation between axis. Data are centered by not scaled by
default.
Usage
pca(data, scale = FALSE)
Arguments
data |
a numeric matrix describing the points |
scale |
a |
Value
a numeric matrix with at most n-1
dimensions, with
n
the number pf observations. This matrix defines the
coordinates of each point in the orthogonal space.
Author(s)
Eric Coissac
Christelle Gonindard-Melodelima
Examples
data(bacteria)
bacteria_rel_freq <- sweep(bacteria,
1,
rowSums(bacteria),
"/")
bacteria_hellinger <- sqrt(bacteria_rel_freq)
project <- pca(bacteria_hellinger)