Learn R Programming

ade4 (version 1.01)

dist.dudi: Computation of the Distance Matrix of a Statistical Triplet

Description

computes for a statistical triplet a distance matrix.

Usage

dist.dudi(dudi, amongrow = TRUE)

Arguments

dudi
a duality diagram, object of class 'dudi'
amongrow
a logical value computing the distance if TRUE, between rows, if FALSE between columns.

Value

  • an object of class 'dist'

Examples

Run this code
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

Run the code above in your browser using DataLab