histogram_plot: Choose to plot histogram or bar plot

Description Usage Arguments Details Value

View source: R/histogram_plot.R

Description

histogram_plot() plots a histogram if a continuous variable from accidents is chosen or a bar plot if a categorical variable is chosen.

Usage

1

Arguments

data

A dataframe, specifically the accidents dataset

x

A variable from accidents to plot

y

The number of bins

Details

Creates a bar plot if a categorical variable is chosen to prevent issues with plotting non-continuous data as a histogram.

Value

A histogram plot if continuous or a bar plot if categorical


ahvickers/accidenttracker documentation built on Dec. 18, 2021, 11:26 p.m.