ds_plot_histogram: Generate histograms

Description Usage Arguments Examples

View source: R/ds-plots.R

Description

Creates histograms if the data has continuous variables.

Usage

1
ds_plot_histogram(data, ..., bins = 5, fill = "blue", print_plot = TRUE)

Arguments

data

A data.frame or tibble.

...

Column(s) in data.

bins

Number of bins in the histogram.

fill

Color of the histogram.

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_histogram(mtcarz, mpg)

# plot multiple variables
ds_plot_histogram(mtcarz, mpg, disp, hp)

# plot all variables
ds_plot_histogram(mtcarz)

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