disttoD2 {dbstats}R Documentation

Distance conversion: dist to D2

Description

Converts dist or dissimilarity class object into D2 class object.

Usage

  disttoD2(distance)

Arguments

distance

dist or dissimilarity class object. See functions dist in the package stats and daisy in the package cluster.

Value

An object of class D2 containing the squared distances matrix between individuals.

Author(s)

Boj, Eva <evaboj@ub.edu>, Caballe, Adria <adria.caballe@upc.edu>, Delicado, Pedro <pedro.delicado@upc.edu> and Fortiana, Josep <fortiana@ub.edu>

See Also

GtoD2
D2toG
D2toDist

Examples


X <- matrix(rnorm(100*3),nrow=100)
distance <- daisy(X,"manhattan")
D2 <- disttoD2(distance)


[Package dbstats version 2.0.2 Index]