addCategoricalAttribute: adds a new query to the plot

View source: R/attributes.R

addCategoricalAttributeR Documentation

adds a new query to the plot

Description

adds a new query to the plot

Usage

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)))

upsetjs documentation built on July 13, 2022, 9:06 a.m.