Learn R Programming

upsetjs (version 1.11.1)

addCategoricalAttribute: adds a new query to the plot

Description

adds a new query to the plot

Usage

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

Value

the object given as first argument

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

Examples

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

Run the code above in your browser using DataLab