Description Usage Arguments Examples
Function creating a visualization based on geom_bar() with count and percent labels.
1 | gg_barplot_pct(dataframe, xvar, fillvar, title = NULL)
|
dataframe |
disaggregated data to plot |
xvar |
variable to appear on the x axis; percents are computed based on this |
fillvar |
variable to be used for color |
title |
optional string to be set as the chart title |
1 2 | data(diamonds, package = 'ggplot2')
gg_barplot_pct(diamonds, xvar = cut, fillvar = color, title = 'Diamond color and cut')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.