Skip to contents

Implements a class and methods to work with sets, doing intersection, union, complementary sets, power sets, cartesian product and other set operations in a "tidy" way. These set operations are available for both classical sets and fuzzy sets. Import sets from several formats or from other several data structures.

Details

It provides a class TidySet with methods to do operations with sets.

Author

Maintainer: Lluís Revilla Sancho lluis.revilla@gmail.com (ORCID) [copyright holder]

Other contributors:

  • Zebulun Arendsee [reviewer]

  • Jennifer Chang [reviewer]

Examples

set <- list("A" = letters[1:5], "B" = letters[4:7])
TS <- tidySet(set)
cardinality(TS)
#>   sets cardinality
#> 1    A           5
#> 2    B           4
intersection(TS, c("A", "B"))
#>   elements sets fuzzy
#> 1        d  A∩B     1
#> 2        e  A∩B     1