describe_num_var: Provides statistical summary of the numeric variables for a...

Description Usage Arguments Value Examples

View source: R/eda.R

Description

Provides statistical summary of the numeric variables for a dataframe, such as the mean, median, maximum and minimum for the numeric variables.

Usage

1
describe_num_var(dataframe, num_vars)

Arguments

dataframe

tbl. The dataframe to be inspected.

num_vars

vector of character strings of the names of the numeric variables the user want to explore.

Value

list. A list containing a dataframe with a statistical summary and a ggplot object with histograms of numeric variables faceted by each variable.

Examples

1
2
3
4
5
X <- dplyr::tibble(type = c('Car', 'Bus', 'Car'), height = c(10, 20, 15), width = c(10, 15, 13))
num_vars <- c('height', 'width')
result <- describe_num_var(X, num_vars)
result$summary
result$plot

UBC-MDS/edar documentation built on April 2, 2020, 3:57 a.m.