Description Usage Arguments Value Warning: Note
Determines if the vector or matrix supplied is unique along the first dimension. Useful for preparing for merges.
1 2 |
setn |
a vector, the set of elements of which to find combinations or permutations |
k |
numeric, the size of the tuples |
as.num |
logical, defaults to |
unique |
logical, defaults to |
collapsed |
ogical, defaults to |
For tupleGen()
, a matrix or vector of the specified combinations. For permute()
, a matrix of vector of the permutations of the given set.
These functions are currently implemented with a variety of loops, self-written code, and a top-down structure that creates and then searches all possibilities in order to subsets. Combinatorics generally grow rapidly with inputs, so be careful to manage memory. A faster implementation is most likely in the pipeline.
permute()
is merely a shorthand for calling:
tupleGen(setn, length(setn), as.num, unique = TRUE, collapsed = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.