Convert kth indexes to ij indexes of a dist object

dist_k_ij(k, size)

Arguments

k

kth indexes

size

value of size attribute of the dist object

Value

ij indexes as 2*n matrix where n is length of k vector

Examples

dist_k_ij(4:6, 10:12)
#> [,1] [,2] [,3] #> [1,] 5 6 7 #> [2,] 1 1 1