e_plot_clean_numeric_nonnum_minmax: Cleaning numeric values for nonnumeric and large/small...

View source: R/e_plot_clean_numeric_nonnum_minmax.R

e_plot_clean_numeric_nonnum_minmaxR Documentation

Cleaning numeric values for nonnumeric and large/small values, similarly for dates.

Description

The variables included together are plotted on the same x-axis scale.

Usage

e_plot_clean_numeric_nonnum_minmax(
  dat_this,
  binwidth = 7,
  n_table = 5,
  sw_date = FALSE,
  sw_plot = TRUE,
  lab_title = NULL
)

Arguments

dat_this

data gathered with selected variables

binwidth

for histogram

n_table

is the number of table values to print

sw_date

is the value a date?

sw_plot

TRUE/FALSE switch to plot

lab_title

title before output and for plot

Value

invisible(NULL)

Examples

## requires formatting into two columns: "variables" and "values"
dat_this <-
  dat_mtcars_e |>
  dplyr::select(
    model
  , tidyselect::starts_with("hp")
  , where(is.numeric)
  ) |>
  tidyr::pivot_longer(
    cols      = -model
  , names_to  = "variable"
  , values_to = "value"
  ) |>
  dplyr::select(
    -model
  )
dat_this |> e_plot_clean_numeric_nonnum_minmax()

erikerhardt/erikmisc documentation built on April 17, 2025, 10:48 a.m.