init_distance_table: Init distance table

Description Usage Arguments Details Examples

View source: R/functions.R

Description

The distance matrix is compute for the 'data' given as argument using the 'base::dist' function.

Usage

1

Arguments

data

table with data for computing distance

Details

The aim of this function is to create a table of the format cFrom | cTo | distance that computes in a tidy format for each pair of clusters the distance between them.

Examples

1
2
3
4
5
set.seed(123)
# Artificial data for five objects
obj <- tibble::tibble(x = sample(1:10,5), y = sample(1:10,5))
# Each object is one cluster, pairwise comparison of the clusters given by
init_distance_matrix(obj)

noeliarico/mchclust documentation built on Feb. 19, 2022, 7:18 p.m.