tableLargeScaleCharacteristics: Format a summarise_large_scale_characteristics object into a...

View source: R/tableLargeScaleCharacteristics.R

tableLargeScaleCharacteristicsR Documentation

Format a summarise_large_scale_characteristics object into a visual table.

Description

[Experimental]

Usage

tableLargeScaleCharacteristics(
  result,
  topConcepts = NULL,
  type = "gt",
  header = c("cdm_name", "cohort_name", visOmopResults::strataColumns(result),
    "variable_level"),
  groupColumn = c("table_name", "type", "analysis"),
  hide = character()
)

Arguments

result

A summarised_result object. Output of summariseLargeScaleCharacteristics().

topConcepts

Number of concepts to restrict the table.

type

Type of table. Check supported types with visOmopResults::tableType().

header

Columns to use as header. See options with tidyColumns(result).

groupColumn

Columns to group by. See options with tidyColumns(result).

hide

Columns to hide from the visualisation. See options with tidyColumns(result).

Value

A formatted table.

Examples

## Not run: 
library(DBI)
library(duckdb)
library(CDMConnector)

con <- dbConnect(duckdb(), eunomiaDir())
cdm <- cdmFromCon(con = con, cdmSchema = "main", writeSchema = "main")
cdm <- generateConceptCohortSet(
  cdm = cdm,
  conceptSet = list("viral_pharyngitis" = 4112343),
  name = "my_cohort"
)

result <- summariseLargeScaleCharacteristics(
  cohort = cdm$my_cohort,
  eventInWindow = "condition_occurrence",
  episodeInWindow = "drug_exposure"
)

tableLargeScaleCharacteristics(result)

cdmDisconnect(cdm)

## End(Not run)


CohortCharacteristics documentation built on Oct. 1, 2024, 5:08 p.m.