aggMax: Sane max for aggregation

Description Usage Arguments Details Value

View source: R/extractSimulationResults.R

Description

Sane max for aggregation

Usage

1
aggMax(x)

Arguments

x

[vector(n)]
numerical or character argument

Details

R's max returns ‘-Inf’ for empty lists. This is undesirable for aggregation where we would rather have ‘NA’.

Value

Maximum value in ‘x’ or ‘NA’ if ‘x’ is empty.


babsim.hospital documentation built on Nov. 11, 2021, 1:06 a.m.