int2set | R Documentation |
Alternate between sets and integers representing sets of integers via bits
int2set(n, index = 1, simplify = FALSE) set2int(x, index = 1)
n |
integer respresenting a set |
index |
integer to start from |
simplify |
logical: return a single list if |
x |
list of sets |
Converts an integer into its binary representation and interprets this as a set of integers. Cannot handle sets with more than 31 elements.
For int2set
a list of sets one for each integer
supplied, for set2int
a vector of the same length as the number
of sets supplied.
set2int
: Convert sets to integers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.