subset {dimensio} | R Documentation |
Extract Parts of an Object
Description
Operators acting on objects to extract parts.
Usage
## S4 method for signature 'CA,ANY,missing'
x[[i]]
## S4 method for signature 'PCA,ANY,missing'
x[[i]]
Arguments
x |
An object from which to extract element(s) or in which to replace element(s). |
i |
A |
Details
If i
is "data
", returns a list with the following elements:
data
A
numeric
matrix of raw data.mean
A
numeric
vector giving the variables means (PCA
).sd
A
numeric
vector giving the variables standard deviations (PCA
).
If i
is "rows
", returns a list with the following elements:
coord
A
numeric
matrix of rows/individuals coordinates.cos2
A
numeric
matrix of rows/individuals squared cosine.masses
A
numeric
vector giving the rows masses/individual weights.sup
A
logical
vector specifying whether a point is a supplementary observation or not.
If i
is "columns
", returns a list with the following elements:
coord
A
numeric
matrix of columns/variables coordinates.cor
A
numeric
matrix of correlation between variables and the dimensions (PCA
).cos2
A
numeric
matrix of columns/variables squared cosine.masses
A
numeric
vector giving the columns masses/variable weights.sup
A
logical
vector specifying whether a point is a supplementary observation or not.
If i
is "eigenvalues
", returns a numeric
vector of eigenvalues.
Value
A list
.
Author(s)
N. Frerebeau
See Also
Other mutators:
dimnames()
,
get_contributions()
,
get_coordinates()
,
get_data()
,
get_distances()
,
get_eigenvalues()
,
loadings()
Examples
## Load data
data("iris")
## Compute principal components analysis
X <- pca(iris, scale = TRUE, sup_row = 8:10, sup_col = 1)
## Get results for the individuals
X[["rows"]]