View source: R/exploratory_data_analysis.R
eda_variable_summary | R Documentation |
Exports the basic statistics of the variables within a data frame into a temporary directory. This includes a plots of the prevalence of missing values and frequency of category levels and a table image containing variable's type summary count of the number of rows, missing values, unique values and zero values for each variable.
eda_variable_summary(.dataset)
.dataset |
A data frame requiring exploratory data analysis. |
The data frame is returned invisibly so that the function can be used in a piped workflow.
This is an example of exploratory data analysis using the dlookr and inspectdf packages.
Other exploratory data analysis:
eda_variable_collection()
,
eda_variable_correlation()
,
eda_variable_distribution()
,
eda_variable_outliers()
# example from palmerpenguins
# https://allisonhorst.github.io/palmerpenguins/reference/penguins_raw.html
suppressPackageStartupMessages({
suppressWarnings({
library(palmerpenguins)
})
})
suppressWarnings({
suppressMessages({
eda_variable_summary(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"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.