create_analysis_table: Create EDA table from dataset

Description Usage Arguments Details

View source: R/func.R

Description

These functions create tables summarizing how the variable var_name in the dataset df relates to the specified target variable target_var.

Usage

1
2
3
4
create_analysis_table(df, var_name, target_var, type = "count")

create_numeric_table(df, var_name, target_var, type = "count",
  bins = 30)

Arguments

df

A data.frame with the dataset to analyze

var_name

A string with the variable name to analyze

target_var

A string with the name of the target variable

type

Can be 'count' or 'average' depicting how to get the results back

bins

Number of bins to use for numeric variables

Details

You can specify the type as 'count' or 'average'. Use 'count' to get counts of each variable value for the values of the target variable. Use 'average' to get the average of the target variable for variable value.

In the case of create_numeric_table the input variable is a numeric variable and its values are created as bins, with number of bins defined as bins


theunis/eda documentation built on Nov. 5, 2019, 10:05 a.m.