Learn R Programming

IncidencePrevalence (version 1.1.0)

tablePrevalenceAttrition: Table of prevalence attrition results

Description

Table of prevalence attrition results

Usage

tablePrevalenceAttrition(
  result,
  type = "gt",
  header = "variable_name",
  groupColumn = c("cdm_name", "outcome_cohort_name"),
  settingsColumn = NULL,
  hide = c("denominator_cohort_name", "estimate_name", "reason_id", "variable_level")
)

Value

A visual table.

Arguments

result

A summarised_result object. Output of summariseCohortAttrition().

type

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

header

Columns to use as header. See options with colnames(omopgenerics::splitAll(result)). Variables in settingsColumn are also allowed

groupColumn

Variables to use as group labels. Allowed columns are the same as in header

settingsColumn

Variables from the settings attribute to display in the table

hide

Table columns to exclude, options are the ones described in header

Examples

Run this code
# \donttest{
cdm <- mockIncidencePrevalence(sampleSize = 1000)
cdm <- generateDenominatorCohortSet(
  cdm = cdm, name = "denominator",
  cohortDateRange = c(as.Date("2008-01-01"), as.Date("2018-01-01"))
)
prev <- estimatePointPrevalence(
  cdm = cdm,
  denominatorTable = "denominator",
  outcomeTable = "outcome",
  interval = "months"
)
tablePrevalenceAttrition(prev)
# }

Run the code above in your browser using DataLab