| pca | R Documentation | 
Computes a principal components analysis based on the singular value decomposition.
## S4 method for signature 'CompositionMatrix'
pca(
  object,
  center = TRUE,
  scale = FALSE,
  rank = NULL,
  sup_row = NULL,
  sup_col = NULL,
  weight_row = NULL,
  weight_col = NULL
)
## S4 method for signature 'LogRatio'
pca(
  object,
  center = TRUE,
  scale = FALSE,
  rank = NULL,
  sup_row = NULL,
  sup_col = NULL,
  weight_row = NULL,
  weight_col = NULL
)
object | 
 A   | 
center | 
 A   | 
scale | 
 A   | 
rank | 
 An   | 
sup_row | 
 A   | 
sup_col | 
 A   | 
weight_row | 
 A   | 
weight_col | 
 A   | 
A dimensio::PCA object. See dimensio::pca() for details.
pca(CompositionMatrix): PCA of centered log-ratio, i.e. log-ratio analysis (LRA).
N. Frerebeau
Aitchison, J. and Greenacre, M. (2002). Biplots of compositional data. Journal of the Royal Statistical Society: Series C (Applied Statistics), 51: 375-392. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/1467-9876.00275")}.
Filzmoser, P., Hron, K. and Reimann, C. (2009). Principal component analysis for compositional data with outliers. Environmetrics, 20: 621-632. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/env.966")}.
dimensio::pca(), dimensio::biplot(), dimensio::screeplot(),
dimensio::viz_individuals(), dimensio::viz_variables()
## Data from Day et al. 2011
data("kommos", package = "folio") # Coerce to compositional data
kommos <- remove_NA(kommos, margin = 1) # Remove cases with missing values
coda <- as_composition(kommos, groups = 1) # Use ceramic types for grouping
## Log-Ratio Analysis
X <- pca(coda)
## Biplot
biplot(X)
## Explore results
viz_individuals(X, extra_quali = group_names(coda))
viz_variables(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.