Learn R Programming

ggforce (version 0.4.1)

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")

Value

A data.frame

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.

Examples

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

Run the code above in your browser using DataLab