Skip to contents

Given TidySet retrieve the elements or substitute them.

Usage

elements(object)

elements(object) <- value

# S4 method for TidySet
elements(object)

# S4 method for TidySet
elements(object) <- value

replace_elements(object, value)

# S4 method for TidySet
nElements(object)

Arguments

object

A TidySet object.

value

Modification of the elements.

Value

A data.frame with information about the elements

Methods (by class)

  • elements(TidySet): Retrieve the elements

  • elements(TidySet) <- value: Modify the elements

  • nElements(TidySet): Return the number of elements

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