Learn R Programming

upsetjs (version 1.3.1)

addCategoricalAttribute: 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

Run this code
# NOT RUN {
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