dist_setNames: Set the names/labels of a 'dist' object.

dist_setNamesR Documentation

Set the names/labels of a dist object.

Description

Set the names/labels of a dist object.

Usage

dist_setNames(d, nm)

Arguments

d

A distance matrix object of class dist.

nm

New labels for the rows/columns.

Value

A distance matrix with new row/column labels.

Examples

m4 <- matrix(1:16, nrow=4, dimnames=list(LETTERS[1:4]))
dm4 <- dist(m4)
dist_setNames(dm4, LETTERS[9:12])

kylebittinger/usedist documentation built on June 1, 2024, 3:25 p.m.