Convert kth index to ij index of a dist object

dist_k_ij_(k, size)

Arguments

k

kth index

size

value of size attribute of the dist object

Value

ij index as a length two integer vector

Examples

dist_k_ij_(4, 10)
#> [1] 5 1