getUniquePairsUpTo | R Documentation |
This function generates all unique pairs of integers up to a given number.
getUniquePairsUpTo(x, oneIndexed = TRUE)
x |
An integer specifying the upper limit for pairs. |
oneIndexed |
A logical indicating whether the pairs should be one indexed. Default is TRUE. |
A list of unique pairs of integers up to the specified number.
# Generate unique pairs up to 3 (one-indexed)
getUniquePairsUpTo(3)
# Generate unique pairs up to 3 (zero-indexed)
getUniquePairsUpTo(3, oneIndexed = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.