Tabulate syndrome combinations for a specified condition

calc_syndrome_combinations(
  d,
  condition,
  syndrome_names,
  syndrome_values = NULL,
  specimen_types = NULL,
  sites = NULL
)

Arguments

d

A data object obtained from load_data.

condition

A string specifying the condition to tabulate causal chain presence for. To list all possibilities, see valid_conditions.

syndrome_names

A vector specifying conditions to tabulate combinations of presence of for the given condition

syndrome_values

An optional vector of the same length of syndrome_names that specifies the mapping from the official condition names to the values to use for reporting. See example.

specimen_types

An optional vector of specimen types to include in the calculation. If not provided, all specimen types will be used. See valid_specimen_types.

sites

An optional vector of site names to include in the tabulation. If not provided, all sites will be used. See valid_sites.

Examples

calc_syndrome_combinations(mock,
  condition = "Streptococcus pneumoniae",
  syndrome_names = c(
    "Lower respiratory infections",
    "Meningitis/Encephalitis",
    "Neonatal sepsis",
    "Congenital infection"),
  syndrome_values = c(
    "Pneumonia",
    "Meningitis",
    "Sepsis",
    "Sepsis"),
  specimen_types = c(
    "Cerebrospinal fluid sample",
    "Tissue specimen from lung",
    "Whole blood")
)