View source: R/prep_data_lollipop.R
prep_data_lollipop | R Documentation |
mk_lollipop
. Not for external use.prep_data_lollipop
takes in the original data frame, the
x, y variables, and instruction on how to order the y levels. It returns a
data frame for making and labeling a horizontal lollipop chart.
prep_data_lollipop(df, xvar, yvar, yorder)
df |
Data frame of the original data. |
xvar |
String, name of x numeric variable. |
yvar |
String, name of y categorical (character or factor) variable. |
yorder |
String, possible values are "alphanumeric", "descend" or "ascend". If "alphanumeric", order y levels in alphanumerical order along y-axis. If "ascend"/"descend", order y levels in ascending/descending order of the sum of absolute x-values along y-axis. |
A data frame for making and labeling a horizontal lollipop chart.
mk_lollipop
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.