aggMax: Sane max for aggregation

View source: R/extractSimulationResults.R

aggMaxR Documentation

Sane max for aggregation

Description

Sane max for aggregation

Usage

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 May 30, 2022, 9:05 a.m.