| dist.dudi {ade4} | R Documentation |
computes for a statistical triplet a distance matrix.
dist.dudi(dudi, amongrow = TRUE)
dudi |
a duality diagram, object of class dudi |
amongrow |
a logical value computing the distance if TRUE, between rows, if FALSE between columns. |
an object of class dist
Daniel Chessel
Stéphane Dray dray@biomserv.univ-lyon1.fr
data (meaudret) pca1 <- dudi.pca(meaudret$mil, scan = FALSE) sum((dist(scalewt(meaudret$mil)) - dist.dudi(pca1))^2) #[1] 4.045e-29 the same thing
> library(ade4) > ### Name: dist.dudi > ### Title: Computation of the Distance Matrix from a Statistical Triplet > ### Aliases: dist.dudi > ### Keywords: array multivariate > > ### ** Examples > > data (meaudret) > pca1 <- dudi.pca(meaudret$mil, scan = FALSE) > sum((dist(scalewt(meaudret$mil)) - dist.dudi(pca1))^2) [1] 3.774206e-29 > #[1] 4.045e-29 the same thing > > > >