histogram_deprecated_1 function

Histogram

Histogram

Create a histogram

histogram_deprecated_1( vector = NULL, number_of_bins = 30, x_tick_marks = NULL, y_tick_marks = NULL, fill_color = "cyan4", border_color = "black", y_axis_title_vjust = 0.85, x_axis_title = NULL, y_axis_title = NULL, cap_axis_lines = FALSE, notify_na_count = NULL )

Arguments

  • vector: a numeric vector
  • number_of_bins: number of bins for the histogram (default = 30)
  • x_tick_marks: a vector of values at which to place tick marks on the x axis (e.g., setting x_tick_marks = seq(0, 10, 5) will put tick marks at 0, 5, and 10.)
  • y_tick_marks: a vector of values at which to place tick marks on the y axis (e.g., setting y_tick_marks = seq(0, 10, 5) will put tick marks at 0, 5, and 10.)
  • fill_color: color for inside of the bins (default = "cyan4")
  • border_color: color for borders of the bins (default = "black")
  • y_axis_title_vjust: position of the y axis title (default = 0.85).
  • x_axis_title: title for x axis (default = "Value")
  • y_axis_title: title for y axis (default = "Count")
  • cap_axis_lines: logical. Should the axis lines be capped at the outer tick marks? (default = FALSE)
  • notify_na_count: if TRUE, notify how many observations were removed due to missing values. By default, NA count will be printed only if there are any NA values.

Returns

the output will be a histogram, a ggplot object.

Examples

histogram_deprecated_1(1:100) histogram_deprecated_1(c(1:100, NA)) histogram_deprecated_1(vector = mtcars[["mpg"]]) histogram_deprecated_1( vector = mtcars[["mpg"]], x_tick_marks = seq(10, 36, 2)) histogram_deprecated_1( vector = mtcars[["mpg"]], x_tick_marks = seq(10, 36, 2), y_tick_marks = seq(0, 8, 2), y_axis_title_vjust = 0.5, y_axis_title = "Freq", x_axis_title = "Values of mpg")