# NOT RUN {
df <- dplyr::starwars
head(df[, c(1, 4, 5, 12)], 10)
# Characters per movies combinations in a list column
head(df$films, 2)
freqs_list(df, films)
# Skin colours in a comma-separated column
head(df$skin_color)
x <- freqs_list(df, skin_color, min_elements = 2, limit = 5, plot = FALSE)
# Inside "x" we'll have:
names(x)
# Using the 'wt' argument to add a continuous value metric
# into an already one-hot encoded columns dataset (and hide tail)
csv <- "https://raw.githubusercontent.com/hms-dbmi/UpSetR/master/inst/extdata/movies.csv"
movies <- read.csv(csv, sep = ";")
head(movies)
freqs_list(movies,
wt = AvgRating, min_elements = 2, tail = FALSE,
title = "Movies\nMixed Genres\nRanking"
)
# So, please: no more Comedy+SciFi and more Drama+Horror films (based on ~50 movies)!
# }
Run the code above in your browser using DataLab