calc_summary_measures: Calculate All Summary Measures

calc_summary_measuresR Documentation

Calculate All Summary Measures

Description

[Stable] Calculate summary statistics and credible intervals from a ⁠<data.frame>⁠ by group.

Usage

calc_summary_measures(
  samples,
  summarise_by = NULL,
  order_by = NULL,
  CrIs = c(0.2, 0.5, 0.9)
)

Arguments

samples

A data.table containing at least a value variable

summarise_by

A character vector of variables to group by.

order_by

A character vector of parameters to order by, defaults to all summarise_by variables.

CrIs

Numeric vector of credible intervals to calculate.

Value

A data.table containing summary statistics by group.

Examples

samples <- data.frame(value = 1:10, type = "car")
# default
calc_summary_measures(samples)
#  by type
calc_summary_measures(samples, summarise_by = "type")

EpiNow2 documentation built on Oct. 31, 2024, 5:09 p.m.