ds_plot_bar: Generate bar plots

Description Usage Arguments Examples

View source: R/ds-plots.R

Description

Creates bar plots if the data has categorical variables.

Usage

1
ds_plot_bar(data, ..., fill = "blue", print_plot = TRUE)

Arguments

data

A data.frame or tibble.

...

Column(s) in data.

fill

Color of the bars.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

Examples

1
2
3
4
5
6
7
8
# plot single variable
ds_plot_bar(mtcarz, cyl)

# plot multiple variables
ds_plot_bar(mtcarz, cyl, gear)

# plot all variables
ds_plot_bar(mtcarz)

rsquaredacademy/descriptr documentation built on July 9, 2021, 8:13 p.m.