dist.slots: Get the Number of Slots in a Distance Matrix

Description Usage Arguments Value See Also Examples

Description

This function receives the number n of objects to compare and computes how many different distances will be stored in a distance matrix, i.e., what the number of slots of a dist object will be. The inverse function is dist.n.

Usage

1

Arguments

n

the number of objects to compare

Value

the required number of slots in a distance matrix

See Also

dist.n

Examples

1
2
3
4
5
6
7
8
dist.slots(1)
# 0 ## (no distance between 1 object)
dist.slots(2)
# 1 ## (one distance between 2 objects)
dist.slots(3)
# 3 ## (AB, AC, BC)
dist.slots(4)
# 6 ## (AB, AC, AD, BC, BD, CD)

thomasWeise/distanceR documentation built on May 14, 2019, 7:35 a.m.