create_data_tab: Apply a Function to an Array, For Extract Creation

Description Usage Arguments Value Examples

Description

Apply a Function to an Array, For Extract Creation

Usage

1
create_data_tab(df, index, margin, tab.max, fnc, ...)

Arguments

df

a tibble

index

variable name in x to apply the specified function

margin

variable name in x to stratify data in index

tab.max

for a given extract, largest number of unique stratiying values

fnc

the function to be applied

...

optional arguments to fun

Value

An array including results of function specified as fun, on variable specified as index, stratified by margin, first element is for entire array, remaining elements are for stratified

Examples

1
create_data_tab(nycflights13::flights, "air_time", "origin", 3, mean)

ingels11/TableRExtracts documentation built on May 23, 2019, 8:50 a.m.