create sankey visual
sankey.Rd
FUNCTION_DESCRIPTION
Usage
sankey(
x,
settings_scale = 0.01,
settings_offset = 0.2,
settings_head_angle = 90,
settings_format = "%.0f",
settings_unit = "%",
fig_title,
sankey_label = "",
sankey_color = FALSE,
center_text_bold = FALSE
)
Arguments
- x
PARAM_DESCRIPTION
- settings_scale
PARAM_DESCRIPTION, Default: 0.01
- settings_offset
PARAM_DESCRIPTION, Default: 0.2
- settings_head_angle
PARAM_DESCRIPTION, Default: 90
- settings_format
PARAM_DESCRIPTION, Default: "%.0f"
- settings_unit
PARAM_DESCRIPTION, Default: "%"
- fig_title
PARAM_DESCRIPTION
- sankey_label
PARAM_DESCRIPTION, Default: ""
- sankey_color
PARAM_DESCRIPTION, Default: FALSE
- center_text_bold
PARAM_DESCRIPTION, Default: FALSE
Examples
if (FALSE) {
if(interactive()){
#EXAMPLE1
example1 <- data.frame(
flows = c(0.25, 0.15, 0.60, -0.20, -0.15, -0.05, -0.50, -0.10),
labels = c("", "", "", "First", "Second", "Third", "Fourth", "Fifth"),
orientations = c(-1, 1, 0, 1, 1, 1, 0, -1),
pathlengths=10
)
example2 <- data.frame(
flows = c(15, 0, 60, -10, -20, -5, -15, -30, -20),
labels = c('', '', '', 'First', 'Second', 'Third', 'Looooooong Fourth',
'Fifth', 'Hurray!'),
orientations = c(-1, 1, 0, 1, 1, 1, -1, 1, 0),
pathlengths = c(0.25, 0.25, 0.25, 0.25, 0.25, 0.1, .5, 0.25,
0.25),
color='r'
)
sankey(x = example2, fig_title = "Boom?", sankey_color = "lightblue", sankey_label = "the whole system")
}
}