'Function for generating river plots (alluvial diagrams) to visualize flows and transitions over time or between categories.'
Usage
riverplot(
data,
id = NULL,
time,
strata,
weight = NULL,
plotType = "alluvial",
fillType = "first",
sortStreams = TRUE,
labelNodes = TRUE,
curveType = "cardinal",
showCounts = FALSE,
showLegend = TRUE,
mytitle = "",
xtitle = "",
ytitle = "",
originaltheme = FALSE
)
Arguments
- data
The data as a data frame.
- id
Optional identifier for individual entities in the data.
- time
Variable representing time points or sequential stages.
- strata
Variables containing the categories that change over time.
- weight
Optional numerical variable to determine stream width.
- plotType
Type of river plot to generate.
- fillType
Determines how colors are assigned to flows.
- sortStreams
Sort alluvial streams by frequency.
- labelNodes
Add labels to nodes.
- curveType
Type of curve to use for stream paths.
- showCounts
Display counts on the diagram.
- showLegend
Display color legend.
- mytitle
Title for the plot.
- xtitle
Label for the x-axis.
- ytitle
Label for the y-axis.
- originaltheme
Use the ggStatsPlot theme instead of the default theme.