tableInObservation: Create a visual table from a summariseInObservation() result.

View source: R/tableInObservation.R

tableInObservationR Documentation

Create a visual table from a summariseInObservation() result.

Description

Create a visual table from a summariseInObservation() result.

Usage

tableInObservation(result, type = "gt")

Arguments

result

A summarised_result object.

type

Type of formatting output table, either "gt", "reactable" or "datatable".

Value

A gt or flextable object with the summarised data.

Examples


library(dplyr, warn.conflicts = FALSE)

cdm <- mockOmopSketch()

result <- summariseInObservation(
  cdm$observation_period,
  interval = "months",
  output = c("person-days", "record"),
  ageGroup = list("<=60" = c(0, 60), ">60" = c(61, Inf)),
  sex = TRUE
)

result |>
  tableInObservation()

PatientProfiles::mockDisconnect(cdm)


OmopSketch documentation built on June 8, 2025, 1:36 p.m.