Learn R Programming

ggalluvial (version 0.5.0)

to_alluvia: Expand an axis indicator and an axis value into multiple axis variables

Description

Take a data frame with axis and axis value variables to be used in an alluvial diagram, and reshape the data frame so that the axes constitute separate variables whose values are given by the value variable. This function invokes spread_.

Usage

to_alluvia(data, key, value, id)

Arguments

data

Data frame.

key, value, id

Numeric or character; the fields corresponding to the axis (variable), stratum (value), and alluvium (identifying) variables.