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.


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


Maintainer: Lluís Revilla Sancho [email protected] (ORCID) [copyright holder]

Other contributors:

  • Zebulun Arendsee [reviewer]

  • Jennifer Chang [reviewer]


set <- list("A" = letters[1:5], "B" = letters[4:7])
TS <- tidySet(set)
#>   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