gg_barplot_pct: Barplot with labels

Description Usage Arguments Examples

View source: R/barplot.R

Description

Function creating a visualization based on geom_bar() with count and percent labels.

Usage

1
gg_barplot_pct(dataframe, xvar, fillvar, title = NULL)

Arguments

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

Examples

1
2
data(diamonds, package = 'ggplot2')
gg_barplot_pct(diamonds, xvar = cut, fillvar = color, title = 'Diamond color and cut')

phively/gghelpeR documentation built on Dec. 31, 2020, 2:02 a.m.