leaf_interact_all: Create an interaction column

Description Usage Arguments Value See Also

View source: R/leaf_interact.R

Description

Description

Usage

1
2
3
4
5
6
7
8
leaf_interact_all(
  tbl,
  ...,
  cols = NULL,
  except = NULL,
  sep = " x ",
  col_sep = NULL
)

Arguments

tbl

A data frame

...

One or more column names to interact with all other columns, either unquoted names or a character vector

cols

A string or character vector of one or more column names

except

An unquote name or a character vector of one or more column names not to interact, e.g. a column of weights

sep

A string indicating the separator to place between values in observations

col_sep

A string indicating the separator to place between column names. If NULL, defaults to sep with spaces replaced by underscores

Value

A modified tbl with an interaction column added

See Also

leaf_interact() to create interactions one at a time

1
[leaf_interactions()] to create multiple interactions at once

rossellhayes/leafpeepr documentation built on Feb. 29, 2020, 12:48 a.m.