getAveragingTransform: get function that calculates new feature: average of...

Description Usage Arguments Value

Description

get function that calculates new feature: average of <avg_col> by group

Usage

1
getAveragingTransform(group_cols, avg_col, out_col, fit_dt, n_threshold = 500)

Arguments

group_cols:

vector of column names to group by the average calculation

avg_col:

column to average

output_col:

column name to output the new feature

fit_dt:

data.table with columns in group_cols and avg_col

n_threshold:

calculate average only when group size exceed this

Value

list(col, fun) where fun is the transformation function


jukujala/R-data-pipe documentation built on Jan. 13, 2020, 11:28 a.m.