power_set {BaseSet}R Documentation

Create the power set

Description

Create the power set of the object: All the combinations of the elements of the sets.

Usage

power_set(object, set, name, ...)

Arguments

object

A TidySet object.

set

The name of the set to be used for the power set, if not provided all are used.

name

The root name of the new set, if not provided the standard notation "P()" is used.

...

Other arguments passed down if possible.

Value

A TidySet object with the new set.

See Also

Other methods: TidySet-class, activate(), add_column(), add_relation(), arrange.TidySet(), cartesian(), complement_element(), complement_set(), complement(), element_size(), elements(), filter.TidySet(), group_by.TidySet(), group(), incidence(), intersection(), is.fuzzy(), is_nested(), move_to(), mutate.TidySet(), nElements(), nRelations(), nSets(), name_elements<-(), name_sets<-(), name_sets(), pull.TidySet(), relations(), remove_column(), remove_element(), remove_relation(), remove_set(), rename_elements(), rename_set(), select.TidySet(), set_size(), sets(), subtract(), union()

Examples

relations <- data.frame(
    sets = c(rep("a", 5), "b"),
    elements = letters[seq_len(6)]
)
TS <- tidySet(relations)
power_set(TS, "a", name = "power_set")

[Package BaseSet version 0.9.0 Index]