Skip to contents

A set is a group of unique elements it can be either a fuzzy set, where the relationship is between 0 or 1 or nominal.

Details

When printed if an element or a set do not have any relationship is not shown. They can be created from lists, matrices or data.frames. Check tidySet() constructor for more information.

Slots

relations

A data.frame with elements and the sets were they belong.

elements

A data.frame of unique elements and related information.

sets

A data.frame of unique sets and related information.

Examples

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