creates a new UpSet set structure

asSet(name, elems = c(), cardinality = length(elems), color = NULL)

Arguments

name

name of the set

elems

the elements of the set

cardinality

the cardinality of the set, default to length(elems)

color

the color of the set

Value

the set object

Examples

asSet("a", c(1, 2, 3))
#> $name
#> [1] "a"
#> 
#> $type
#> [1] "set"
#> 
#> $elems
#> [1] 1 2 3
#> 
#> $cardinality
#> [1] 3
#> 
#> $color
#> NULL
#> 
#> attr(,"class")
#> [1] "upsetjs_set"