eda_variable_collection: Run the exploratory data analyses

eda_variable_collectionR Documentation

Run the exploratory data analyses

Description

[Experimental]

Export the collection of exploratory data analyses plots and tables into a temporary directory. This includes the summary, distribution and correlation of variables and presence of outliers exported by default, any of which may be excluded in the export.

Usage

eda_variable_collection(
  .dataset,
  summary = TRUE,
  outliers = TRUE,
  distribution = TRUE,
  correlation = TRUE
)

Arguments

.dataset

A data frame requiring exploratory data analysis.

summary

Use the default TRUE to display variable summary or FALSE to not display variable summary.

outliers

Use the default TRUE to display outliers or FALSE to not display outliers.

distribution

Use the default TRUE to display variable distribution or FALSE to not display variable distribution.

correlation

Use the default TRUE to display variable correlation or FALSE to not display variable correlation.

Value

The data frame is returned invisibly so that the function can be used in a piped workflow.

Figures

01-summary_table.png 02-missing_data.png 03-category_data.png 04-outliers_table.png 05-variable_outliers.png 06-distribution_table.png 07-distribution_plot.png 08-correlation_plot.png

See Also

Other exploratory data analysis: eda_variable_correlation(), eda_variable_distribution(), eda_variable_outliers(), eda_variable_summary()

Examples

## Not run: 
# example from palmerpenguins
# https://allisonhorst.github.io/palmerpenguins/reference/penguins_raw.html
suppressPackageStartupMessages({
  suppressWarnings({
    library(palmerpenguins)
  })
})

suppressMessages({eda_variable_collection(penguins_raw)})

# move figures from temporary directory
suppressPackageStartupMessages({
  suppressWarnings({
    library(fs)
    library(here)
  })
})

if(dir_exists(here("man", "figures"))) {
 file_move(path(tempdir(), "figures", "01-summary_table.png"),
           here("man", "figures", "01-summary_table.png"))

 file_move(path(tempdir(), "figures", "02-missing_data.png"),
           here("man", "figures", "02-missing_data.png"))

 file_move(path(tempdir(), "figures", "03-category_data.png"),
          here("man", "figures", "03-category_data.png"))

 file_move(path(tempdir(), "figures", "04-outliers_table.png"),
           here("man", "figures", "04-outliers_table.png"))

 file_move(path(tempdir(), "figures", "05-variable_outliers.png"),
           here("man", "figures", "05-variable_outliers.png"))

 file_move(path(tempdir(), "figures", "06-distribution_table.png"),
           here("man", "figures", "06-distribution_table.png"))

 file_move(path(tempdir(), "figures", "07-distribution_plot.png"),
           here("man", "figures", "07-distribution_plot.png"))

 file_move(path(tempdir(), "figures", "08-correlation_plot.png"),
           here("man", "figures", "08-correlation_plot.png"))
 }

## End(Not run)

gcfrench/store documentation built on May 17, 2024, 5:52 p.m.