Learn R Programming

neonSoilFlux (version 3.0.0)

powerset: Compute all possible combinations of a vector - ignoring the empty set

Description

Compute all possible combinations of a vector - ignoring the empty set

Usage

powerset(x, size_start = 1)

Value

A list of possible options

Arguments

x

Required. Input vector

size_start

First power set input size

Examples

Run this code
# All possible combinations
powerset(1:4)

# Now try without ignoring the single sets:
powerset(1:4,2)

Run the code above in your browser using DataLab