make_assignments: Make a list of assignments, applying many functions to many...

View source: R/make_assignments.R

make_assignmentsR Documentation

Make a list of assignments, applying many functions to many columns.

Description

Make a list of assignments, applying each function to each column named. Intended to be used as an argument in extend_se() or project_se().

Usage

make_assignments(columns, funs, ..., sep = "_", prefix = TRUE)

Arguments

columns

character, vector of column names to take values from.

funs

character, names of functions to apply.

...

not used, forced later parameters to bind by name

sep

character, naming separator

prefix

logical, if TRUE place function names prior, else after in results.

Examples


assignments <- make_assignments(c('x', 'y'), c('mean', med = 'median'))
print(assignments)
ops <- mk_td('d', c('x', 'y')) %.>% project_se(., assignments)
cat(format(ops))


rquery documentation built on Aug. 20, 2023, 9:06 a.m.