Skip to contents

Functions to add elements. If the elements are new they are added, otherwise they are omitted.

Usage

add_elements(object, elements, ...)

Arguments

object

A TidySet object

elements

A character vector of the elements.

...

Placeholder for other arguments that could be passed to the method. Currently not used.

Value

A TidySet object with the new elements.

Note

add_element doesn't set up any other information about the elements. Remember to add/modify them if needed with mutate or mutate_element

See also

Other add_*: add_relations(), add_sets()

Examples

x <- list("a" = letters[1:5], "b" = LETTERS[3:7])
a <- tidySet(x)
b <- add_elements(a, "fg")
elements(b)
#>    elements
#> 1         a
#> 2         b
#> 3         c
#> 4         d
#> 5         e
#> 6         C
#> 7         D
#> 8         E
#> 9         F
#> 10        G
#> 11       fg