A formatted visualization of sequence_symmetry objects.
Source:R/tableSequenceRatios.R
tableSequenceRatios.Rd
It provides a formatted table with the contents of the summariseSequenceRatios output.
Usage
tableSequenceRatios(
result,
header = "marker_cohort_name",
groupColumn = "cdm_name",
type = "gt",
hide = "variable_level"
)
Arguments
- result
A sequence_symmetry object.
- header
A vector specifying the elements to include in the header. See visOmopResults package for more information on how to use this parameter.
- groupColumn
Columns to use as group labels. See visOmopResults package for more information on how to use this parameter.
- type
The desired format of the output table.
- hide
Columns to drop from the output table.
Examples
# \donttest{
library(CohortSymmetry)
cdm <- mockCohortSymmetry()
#> Warning: ! 9 column in cdm_source do not match expected column type:
#> • `cdm_source_abbreviation` is logical but expected character
#> • `cdm_holder` is logical but expected character
#> • `source_description` is logical but expected character
#> • `source_documentation_reference` is logical but expected character
#> • `cdm_etl_reference` is logical but expected character
#> • `source_release_date` is logical but expected date
#> • `cdm_release_date` is logical but expected date
#> • `cdm_version` is numeric but expected character
#> • `vocabulary_version` is logical but expected character
#> Warning: ! 2 column in concept do not match expected column type:
#> • `valid_start_date` is character but expected date
#> • `valid_end_date` is character but expected date
#> Warning: ! 3 column in concept_relationship do not match expected column type:
#> • `valid_start_date` is logical but expected date
#> • `valid_end_date` is logical but expected date
#> • `invalid_reason` is logical but expected character
#> Warning: ! 3 column in drug_strength do not match expected column type:
#> • `denominator_value` is logical but expected numeric
#> • `valid_start_date` is character but expected date
#> • `valid_end_date` is character but expected date
#> Warning: There are observation period end dates after the current date: 2024-11-29
#> ℹ The latest max observation period end date found is 2026-10-26
#> Warning: There are observation period end dates after the current date: 2024-11-29
#> ℹ The latest max observation period end date found is 2026-10-26
cdm <- generateSequenceCohortSet(cdm = cdm,
indexTable = "cohort_1",
markerTable = "cohort_2",
name = "joined_cohort")
res <- summariseSequenceRatios(cohort = cdm$joined_cohort)
#> Warning: For at least some combinations, index is always before marker or marker always
#> before index
#> -- 5 combinations of 8 had index always before marker
#> -- 5 combinations of 8 had marker always before index
gtResult <- tableSequenceRatios(res)
CDMConnector::cdmDisconnect(cdm = cdm)
# }