Given TidySet retrieve the sets or substitute them.
Methods (by class)
sets(TidySet)
: Retrieve the sets informationsets(TidySet) <- value
: Modify the sets informationnSets(object = TidySet, all = missing)
: Return the number of setsnSets(object = TidySet, all = logical)
: Return the number of sets
See also
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
#> 1 A
#> 2 B
sets(TS) <- data.frame(sets = c("B", "A"))
TS2 <- replace_sets(TS, data.frame(sets = c("A", "B", "C")))
sets(TS2)
#> sets
#> 1 A
#> 2 B
#> 3 C
nSets(TS)
#> [1] 2
nSets(TS2)
#> [1] 3