Learn R Programming

OmopSketch (version 0.5.1)

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

Description

Create a visual table from a summariseInObservation() result.

Usage

tableInObservation(result, type = "gt")

Value

A formatted table object with the summarised data.

Arguments

result

A summarised_result object.

type

Type of formatting output table. See visOmopResults::tableType() for allowed options. Default is "gt"

Examples

Run this code
# \donttest{
library(dplyr, warn.conflicts = FALSE)

cdm <- mockOmopSketch()

result <- summariseInObservation(
  observationPeriod = 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)
# }

Run the code above in your browser using DataLab