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

distance(data, distance = "euc")

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:

Value

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

Details

- Manhattan distance (man): - Euclidean distance (euc): - Chebyshev distance (che):