This function returns upper tri index for usage with
pivot_long
reduction.
uptriidx(n, diag = FALSE)
dimension of initial matrix [mandatory]
indicate if diag should be retained [default: FALSE]
list of positions
uptriidx(10)
#> [1] 2 3 4 5 6 7 8 9 10 13 14 15 16 17 18 19 20 24 25 26 27 28 29 30 35
#> [26] 36 37 38 39 40 46 47 48 49 50 57 58 59 60 68 69 70 79 80 90