Convert ij indexes to k indexes for a dist object

dist_ij_k(i, j, size)

Arguments

i

row indexes

j

column indexes

size

value of size attribute of the dist object

Value

k indexes

Examples

dist_ij_k(1:3, 4:6, 10)
#> [1] 3 12 20