dot-freducePartial: Create a list of partial functions and apply in sequence

.freducePartialR Documentation

Create a list of partial functions and apply in sequence

Description

Apply a function f repeatedly to different columns of a data.frame. Assumes that ellipsis arguments contain (only) one vector entry and that function f should be applied sequentially to each of these entries. Does not work with unquoted column names

Usage

.freducePartial(df, f, cls, ...)

Arguments

df

A data.frame or tibble

f

Function that returns a (mutated) data.frame

cls

character(1) Name of entry in ... for iterating.

...

Extra arguments for f

Value

The result of applying function f sequentially to each of cls, usually a data.frame. Sequential application is key here, when we use [.freducePartial()] a column in cls may not exist in df until f is applied to the previous cls.


HelenLindsay/AbNames documentation built on June 6, 2023, 1:18 p.m.