distance: Calculate matrix of distances

Description Usage Arguments Details Value

View source: R/distance.R

Description

'distance' returns a matrix of distances between all the objects in data using the distance function indicated in the arguments.

Usage

1

Arguments

data

matrix where each row represent an object of the dataset defined by the variables in the columns. If the object is not a matrix but it has and adequate structure (i.e. it is a tibble or data.frame)it will be cast to matrix by the function.

distance

the three-letters name of the distance function chosen to calculate the distance between the objects of the dataset. Codes:

Details

can

Canberra distance

che

Chebyshev distance

cos

Cosine distance

euc

Euclidean distance

jac

Jaccard distance

man

Manhattan distance

mat

Matusita distance

ney

Neyman distance

pea

Pearson distance

trd

Triangular discrimination distance

Value

A matrix containing the distance between all the objects of the dataset calculating with the chosen distance function.


noeliarico/dists documentation built on May 27, 2020, 9:45 a.m.