Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gather_set_data

Tidy data for use with geom_parallel_sets


Description

This helper function makes it easy to change tidy data into a tidy(er) format that can be used by geom_parallel_sets.

Usage

gather_set_data(data, x, id_name = "id")

Arguments

data

A tidy dataframe with some categorical columns

x

The columns to use for axes in the parallel sets diagram

id_name

The name of the column that will contain the original index of the row.

Value

A data.frame

Examples

data <- reshape2::melt(Titanic)
head(gather_set_data(data, 1:4))

ggforce

Accelerating 'ggplot2'

v0.3.3
MIT + file LICENSE
Authors
Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.