Skip to contents

Given TidySet retrieve the sets or substitute them.

Usage

sets(object)

sets(object) <- value

# S4 method for TidySet
sets(object)

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

replace_sets(object, value)

# S4 method for TidySet,missing
nSets(object)

# S4 method for 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

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