sets: Sets of the TidySet

setsR Documentation

Sets of the TidySet

Description

Given TidySet retrieve the sets or substitute them.

Usage

sets(object)

sets(object) <- value

## S4 method for signature 'TidySet'
sets(object)

## S4 replacement method for signature 'TidySet'
sets(object) <- value

replace_sets(object, value)

## S4 method for signature 'TidySet,missing'
nSets(object)

## S4 method for signature 'TidySet,logical'
nSets(object, all)

Arguments

object

A TidySet object.

value

Modification of the sets.

all

A logical value whether it should return all sets or only those present.

Value

A data.frame with information from the sets.

Methods (by class)

  • sets(TidySet): Retrieve the sets information

  • sets(TidySet) <- value: Modify the sets information

  • nSets(object = TidySet, all = missing): Return the number of sets

  • nSets(object = TidySet, all = logical): Return the number of sets

See Also

nSets()

Other slots: elements(), relations()

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(), power_set(), pull.TidySet(), relations(), remove_column(), remove_element(), remove_relation(), remove_set(), rename_elements(), rename_set(), select.TidySet(), set_size(), subtract(), union()

Examples

TS <- tidySet(list(A = letters[1:5], B = letters[2:10]))
sets(TS)
sets(TS) <- data.frame(sets = c("B", "A"))
TS2 <- replace_sets(TS, data.frame(sets = c("A", "B", "C")))
sets(TS2)
nSets(TS)
nSets(TS2)

llrs/BaseSet documentation built on Jan. 28, 2024, 9:05 a.m.