Learn R Programming

ade4 (version 1.01)

dudi: Duality Diagram

Description

as.dudi is called by many functions (pca.dudi, coa.dudi, acm.dudi, ...) and not directly by the user. It creates duality diagrams.

t.dudi returns an object of class 'dudi' where the rows are the columns and the columns are the rows of the initial dudi.

is.dudi returns TRUE if the object is of class dudi

redo.dudi computes again an analysis, eventually changing the number of kept axes. Used by other functions.

Usage

as.dudi(df, col.w, row.w, scannf, nf, call, type, tol = 1e-07, 
    full = FALSE) 
print.dudi(x, ...) 
is.dudi(x) 
redo.dudi(dudi, newnf = 2) 
t.dudi(x)

Arguments

df
a data frame with n rows and p columns
col.w
a numeric vector containing the row weights
row.w
a numeric vector containing the column weights
scannf
a logical value indicating whether the eigenvalues bar plot should be displayed
nf
if scannf FALSE, an integer indicating the number of kept axes
call
generally match.call()
type
a string of characters : the returned list will be of class c(type, "dudi")
tol
a tolerance threshold for null eigenvalues (a value less than tol times the first one is considered as null)
full
a logical value indicating whether all non null eigenvalues should be kept
x, dudi
objects of class dudi
...
further arguments passed to or from other methods
newnf
a data frame

Value

  • as.dudi and all the functions that use it return a list with the following components :
  • taba data frame with n rows et p columns
  • cwrow weights, a vector with n components
  • lwcolumns weights, a vector with p components
  • eigeigenvalues, a vector with min(n,p) components
  • nfinteger, number of kept axes
  • c1principal axes, data frame with p rows et nf columns
  • l1principal componants, data frame with n rows et nf columns
  • cocolumn coordinates, data frame with p rows et nf columns
  • lirow coordinates, data frame with n rows et nf columns
  • calloriginal call

References

Escoufier, Y. (1987) The duality diagram : a means of better practical applications In Development in numerical ecology, Legendre, P. & Legendre, L. (Eds.) NATO advanced Institute, Serie G. Springer Verlag, Berlin, 139--156.

Examples

Run this code
data(deug)
dd1 <- dudi.pca(deug$tab, scannf = FALSE)
dd1
t(dd1)
is.dudi(dd1)
redo.dudi(dd1,3)

Run the code above in your browser using DataLab