adds a new query to the plot

addCategoricalAttribute(upsetjs, name, values, categories = NULL)

Arguments

upsetjs

an object of class upsetjs or upsetjs_proxy

name

name of the attribute

values

the values as a factor

categories

optional categories otherweise the levels are used

Value

the object given as first argument

Examples

upsetjs() %>%
  fromList(list(a = c(1, 2, 3), b = c(2, 3))) %>%
  addCategoricalAttribute("attr", as.factor(sample(c("male", "female"), 3, replace = TRUE)))