subsets | R Documentation |
This function generates subsets of a vector.
subsets(v, n = seq_along(v))
v |
[atomic()'] |
n |
[integer(1)'] |
A list
, each element is a subset of v
.
Other vector helpers:
check_numeric_vector()
,
check_probability_vector()
,
chunk_vector()
,
insert_vector_entry()
,
match_numerics()
,
permutations()
,
split_vector_at()
,
vector_occurrence()
v <- 1:3
subsets(v)
subsets(v, c(1, 3)) # only subsets of length 1 or 3
subsets(integer()) # trivial case works
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.