Learn R Programming

ggalluvial (version 0.9.1)

lode-guidance-functions: Lode guidance functions

Description

These functions control the order of lodes within strata in an alluvial diagram. They are invoked by stat_alluvium() and can be passed to the lode.guidance parameter.

Usage

lode_zigzag(n, i)

lode_rightward(n, i)

lode_leftward(n, i)

lode_rightleft(n, i)

lode_leftright(n, i)

Arguments

n

Numeric, a positive integer

i

Numeric, a positive integer at most n

Details

Each function orders the numbers 1 through n, starting at index i. The choice of function made in stat_alluvium() determines the order in which the other axes contribute to the sorting of lodes within each index axis. After starting at i, the functions order the remaining axes as follows:

  • zigzag: Zigzag outward from i

  • rightward: Increasing order

  • leftward: Decreasing order

  • rightleft: Proceed rightward from i to n, then leftward to 1

  • leftright: Proceed leftward from i to 1, then rightward to n