Learn R Programming

upsetjs (version 1.11.1)

fromDataFrame: extract the sets from a data frame (rows = elems, columns = sets, cell = contained)

Description

extract the sets from a data frame (rows = elems, columns = sets, cell = contained)

Usage

fromDataFrame(
  upsetjs,
  df,
  attributes = NULL,
  order.by = "cardinality",
  limit = NULL,
  shared = NULL,
  shared.mode = "click",
  colors = NULL,
  c_type = NULL,
  store.elems = TRUE
)

Value

the object given as first argument

Arguments

upsetjs

an object of class upsetjs or upsetjs_proxy

df

the data.frame like structure

attributes

the optional column list or data frame

order.by

order intersections by cardinality or degree

limit

limit the ordered sets to the given limit

shared

a crosstalk shared data frame

shared.mode

whether on 'hover' or 'click' (default) is synced

colors

the optional list with set name to color

c_type

the combination type to use

store.elems

whether to store the set elements within the structures (set to false for big data frames)

Examples

Run this code
df <- as.data.frame(list(a = c(1, 1, 1), b = c(0, 1, 1)), row.names = c("a", "b", "c"))
upsetjs() %>% fromDataFrame(df)

Run the code above in your browser using DataLab