Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

supcol

Projections of Supplementary Columns


Description

performs projections of supplementary columns.

Usage

supcol(x, ...)
## S3 method for class 'dudi'
supcol(x, Xsup, ...) 
## S3 method for class 'coa'
supcol(x, Xsup, ...)

Arguments

x

an object used to select a method

Xsup

an array with the supplementary columns (Xsup and x$tab have the same row number)

...

further arguments passed to or from other methods

Details

If supcol.dudi is used, the column vectors of Xsup are projected without prior modification onto the principal components of dudi with the scalar product associated to the row weightings of dudi.

Value

A list of two components:

tabsup

data frame containing the array with the supplementary columns transformed or not

cosup

data frame containing the coordinates of the supplementary projections

Author(s)

Daniel Chessel
Anne-Béatrice Dufour anne-beatrice.dufour@univ-lyon1.fr

Examples

data(rpjdl)
rpjdl.coa <- dudi.coa(rpjdl$fau, scan = FALSE, nf = 4)
rpjdl.coa$co[1:3, ]
supcol(rpjdl.coa, rpjdl$fau[, 1:3])$cosup  #the same

data(doubs)
dudi1 <- dudi.pca(doubs$fish, scal = FALSE, scan = FALSE)
if(adegraphicsLoaded()) {
  g1 <- s.arrow(dudi1$co, plot = FALSE)
  g2 <- s.arrow(supcol(dudi1, data.frame(scalewt(doubs$env)))$cosup, plab.cex = 2, plot = FALSE)
  G <- superpose(g1, g2, plot = TRUE)
  
} else {
  s.arrow(dudi1$co)
  s.arrow(supcol(dudi1, data.frame(scalewt(doubs$env)))$cosup, add.p = TRUE, clab = 2)
  symbols(0, 0, circles = 1, inches = FALSE, add = TRUE)
}

ade4

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

v1.7-16
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr>, Anne-Béatrice Dufour <anne-beatrice.dufour@univ-lyon1.fr>, and Jean Thioulouse <jean.thioulouse@univ-lyon1.fr>, with contributions from Thibaut Jombart, Sandrine Pavoine, Jean R. Lobry, Sébastien Ollier, Daniel Borcard, Pierre Legendre, Stéphanie Bougeard and Aurélie Siberchicot. Based on earlier work by Daniel Chessel.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.