explore_data: Explore the dataset

View source: R/explore_data.R

explore_dataR Documentation

Explore the dataset

Description

Helps to explore data in either visual or tabular form. The view can also be one or two-dimensional.

Usage

explore_data(setup, type = c("visual", "tabular"), factors = NULL, by = NULL)

Arguments

setup

Setup object. Created at the start of the workflow. Usually piped in from previous step.

type

Character scalar. Either visual or tabular.

factors

Character vector. Names of selected potential predictors to limit the scope of results.

by

Character scalar. Name of potential predictor that will constitute the second dimension.

Value

Either list of dataframes or list of ggplot2 charts.

See Also

explore_target, explore_corr

Examples

require(dplyr) # for the pipe operator
data('sev_train')

setup <- setup(
  data_train = sev_train,
  target = 'sev',
  weight = 'numclaims',
  family = 'gamma',
  keep_cols = c('pol_nbr', 'exposure', 'premium')
)

explore_data(setup, type = "tabular")
explore_data(setup, type = "visual")
explore_data(setup, type = "tabular", by = "pol_yr")
explore_data(setup, type = "visual", by = "pol_yr")


realgabon/insuRglm documentation built on Jan. 2, 2023, 2:51 a.m.