format_exp_duration {metalite.sl}R Documentation

Format Exposure Duration Analysis

Description

Format Exposure Duration Analysis

Usage

format_exp_duration(
  outdata,
  display_col = c("n", "prop", "n_cum", "prop_cum", "total"),
  digits_prop = 1,
  display_stat = c("mean", "sd", "se", "median", "q1 to q3", "range")
)

Arguments

outdata

A metadata object created by prepare_sl_summary().

display_col

Column wants to display on the table. "n_cum", "prop_cum" can additionally be selected.

  • n_cum: Number of subjects created by extend_exp_duration().

  • prop_cum: Proportion of subjects created by extend_exp_duration().

digits_prop

Number of digits for proportion columns.

display_stat

A vector of statistics term name. The term name could be selected from c("mean", "sd", "se", "median", "q1 to q3", "range", "q1", "q3", "min", "max").

Value

A list of analysis raw datasets.

Examples

meta <- meta_sl_exposure_example()

meta |>
  prepare_exp_duration(population = "apat", parameter = "expdur") |>
  format_exp_duration(display_col = c("n", "prop", "total"))

[Package metalite.sl version 0.1.1 Index]