pull_max_var: Extract a the Maximum Value of a Variable Based on a Filter

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Extract a the Maximum Value of a Variable Based on a Filter

Usage

1
pull_max_var(df, max_var = NULL, sel_var = NULL, type_selected = NULL)

Arguments

df

Datatable with the following variables: type and si_dist

max_var

Character string containing the variable name to pull out the maximum R estimate for.

sel_var

Character string indicating the variable to extract

type_selected

The nowcast type to extract.

Value

A character string containing the maximum variable

Examples

1
2
3
4
5
df <- data.table::data.table(type = c("nowcast", "other"),
                             var = c(1:10),
                             sel = "test")
                             
pull_max_var(df, max_var = "var", sel_var = "var", type_selected = "nowcast")

epiforecasts/EpiNow documentation built on Oct. 26, 2020, 2:38 p.m.