calc_metrics: Calculate the aggregations metrics (mean, quantiles)

Description Usage Arguments Value Examples

View source: R/quantile_estimation_functions_master.R

Description

This function estimates metrics, by group, given a data table, desired quantiles, and by columns

Usage

1
calc_metrics(dt, cols_to_metric, probs, bycols)

Arguments

dt

a data table containing the raw data

cols_to_metric

a vector of column names on which to calculate metrics

probs

a vector of probabilities that are the target quantiles

bycols

a vector of column names that serve as the grouping variables over which the metrics should be calculated

Value

Returns a single data frame, that contains the raw input data summarized over the bycols

Examples

1
calc_metrics(mytable, c("incidI","incidD"), c(0.05,0.50, 0.95), bycols="groupvar")

lmullany/iddquantiles documentation built on June 21, 2020, 7:28 p.m.