subsets {oeli} | R Documentation |
Generate vector subsets
Description
This function generates subsets of a vector.
Usage
subsets(v, n = seq_along(v))
Arguments
v |
A |
n |
An |
Value
A list
, each element is a subset of v
.
Examples
v <- 1:3
subsets(v)
subsets(v, c(1, 3)) # only subsets of length 1 or 3
subsets(integer()) # trivial case works
[Package oeli version 0.5.2 Index]