make_interactions: Make Interactions Over Selected Variables With Given Function

Description Usage Arguments Examples

Description

For now the problem with naming new columns exists. It will be solving in the future. But the main functionality seems to work well. If you stuck with a bug please create a new issue here https://github.com/pavel-filatov/featr/issues.

Usage

1

Arguments

.df

data frame

.f

function

...

variables to interact, symbols and tidyselect functions allowed

Examples

1
2
3
4
5
6
7
mtcars %>% 
  select(am, cyl, mpg) %>% 
  mutate(
    !!!make_interactions(., "-", 1, 2),
    !!!make_interactions(., "+", am, cyl),
    !!!make_interactions(., "/", everything())
  )

pavel-filatov/featr documentation built on May 12, 2019, 1:29 a.m.