Learn R Programming

OmopSketch (version 0.5.1)

tableRecordCount: Create a visual table from a summariseRecordCount() result.

Description

Create a visual table from a summariseRecordCount() result.

Usage

tableRecordCount(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()

summarisedResult <- summariseRecordCount(
  cdm = cdm,
  omopTableName = c("condition_occurrence", "drug_exposure"),
  interval = "years",
  ageGroup = list("<=20" = c(0, 20), ">20" = c(21, Inf)),
  sex = TRUE
)

tableRecordCount(result = summarisedResult)

PatientProfiles::mockDisconnect(cdm = cdm)
# }

Run the code above in your browser using DataLab