View source: R/tableCohortTiming.R
tableCohortTiming | R Documentation |
tableCohortTiming(
result,
timeScale = "days",
uniqueCombinations = TRUE,
type = "gt",
header = strataColumns(result),
groupColumn = c("cdm_name"),
hide = c("variable_level", settingsColumns(result))
)
result |
A summarised_result object. |
timeScale |
Time scale to show, it can be "days" or "years". |
uniqueCombinations |
Whether to restrict to unique reference and comparator comparisons. |
type |
Type of table. Check supported types with
|
header |
Columns to use as header. See options with
|
groupColumn |
Columns to group by. See options with
|
hide |
Columns to hide from the visualisation. See options with
|
A formatted table.
## Not run:
library(CohortCharacteristics)
library(duckdb)
library(CDMConnector)
library(DrugUtilisation)
con <- dbConnect(duckdb(), eunomiaDir())
cdm <- cdmFromCon(con, cdmSchem = "main", writeSchema = "main")
cdm <- generateIngredientCohortSet(
cdm = cdm,
name = "my_cohort",
ingredient = c("acetaminophen", "morphine", "warfarin")
)
timings <- summariseCohortTiming(cdm$my_cohort)
tableCohortTiming(timings, timeScale = "years")
cdmDisconnect(cdm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.