View source: R/get_bar_labels_freq.R
get_bar_labels_freq | R Documentation |
mk_barplot_freq
. Not for external use.get_bar_labels_freq
takes in the original data frame, and
returns a data frame of labels and their postions for mk_barplot_freq
.
get_bar_labels_freq(df, var, fillby, show_pct)
df |
Data frame of the original data where bar charts are made of. |
var |
String, name of the categorical variable to be counted. |
fillby |
String, name of a second categorical variable used for sub-dividing and coloring the bars. |
show_pct |
Logical, if TRUE, calculate bars middle position using pct. Otherwise, calculate bars middle position using count. Default is FALSE. |
A data frame containing bar labels and their positions
mk_barplot_freq
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.