Manipulates a data frame ready for plotting with the waffle_chart
function.
waffleize(dt, fill, value, composition = TRUE, max_value = NULL, digits = 3)
dt | data frame containing the data which should be transformed |
---|---|
fill | character specifying the column name which should be used as fill for the waffle plot. |
value | character specifying the column name which contains values of the |
composition | logical indicating whether a compositional waffle (i.e. fill adds up to 100%) should be created. If |
max_value | numerical giving the value to which waffle cells should be scaled to, if |
digits | integer indicating the number of decimal places to be used in rounding of the waffle cells. |
returns a tibble data frame containing the minimum and maximum extent of each fill
level.
Other waffle:
round_preserve_sum()
,
waffle_chart()