calculate_stats_numeric: Calculate statistics of numerical attributes

Description Usage Arguments Examples

Description

This function calculates statistics for numerical attributes. All numerical variables are selected by the function automatically. If you want to apply it so specific columns only you need to specify that prior or after the function is applied. If you want to caculate the share in a group by manner you can use the nest-mutate-map combination. See examples for an illustration.

Usage

1

Arguments

df

A data frame

Examples

1
2
3
4
5
6
7
8
9
recipes::credit_data %>%
  calculate_stats_numeric()

recipes::credit_data %>%
  first_to_lower() %>%
  nest(-marital) %>%
  mutate(stats = purrr::map(data, ~calculate_stats_numeric(.x))) %>%
  select(marital, stats) %>%
  unnest()

konradsemsch/aider documentation built on May 22, 2019, 2:40 p.m.