Given TidySet retrieve the elements or substitute them.
Usage
elements(object)
elements(object) <- value
# S4 method for class 'TidySet'
elements(object)
# S4 method for class 'TidySet'
elements(object) <- value
replace_elements(object, value)
# S4 method for class 'TidySet,missing'
nElements(object)
# S4 method for class 'TidySet,logical'
nElements(object, all)
Methods (by class)
elements(TidySet)
: Retrieve the elementselements(TidySet) <- value
: Modify the elementsnElements(object = TidySet, all = missing)
: Return the number of elementsnElements(object = TidySet, all = logical)
: Return the number of elements
See also
Other slots:
relations()
,
sets()
Other methods:
TidySet-class
,
activate()
,
add_column()
,
add_relation()
,
arrange.TidySet()
,
cartesian()
,
complement_element()
,
complement_set()
,
complement()
,
element_size()
,
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()
,
sets()
,
subtract()
,
union()
Examples
TS <- tidySet(list(A = letters[1:5], B = letters[2:10]))
elements(TS)
#> elements
#> 1 a
#> 2 b
#> 3 c
#> 4 d
#> 5 e
#> 6 f
#> 7 g
#> 8 h
#> 9 i
#> 10 j
elements(TS) <- data.frame(elements = letters[10:1])
TS2 <- replace_elements(TS, data.frame(elements = letters[1:11]))
nElements(TS)
#> [1] 10
nElements(TS2)
#> [1] 11