getUniquePairsUpTo {FastUtils} | R Documentation |
Generate Unique Pairs Up To a Number
Description
This function generates all unique pairs of integers up to a given number.
Usage
getUniquePairsUpTo(x, oneIndexed = TRUE)
Arguments
x |
An integer specifying the upper limit for pairs. |
oneIndexed |
A logical indicating whether the pairs should be one-indexed. Default is TRUE. |
Value
A list of unique pairs of integers up to the specified number.
Examples
# Generate unique pairs up to 3 (one-indexed)
getUniquePairsUpTo(3)
# Generate unique pairs up to 3 (zero-indexed)
getUniquePairsUpTo(3, oneIndexed = FALSE)
[Package FastUtils version 0.1.1 Index]