A function to extract the outcomes found in characterization
Source:R/CharacterzationQueries.R
getCharacterizationOutcomes.RdA function to extract the outcomes found in characterization
Usage
getCharacterizationOutcomes(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
targetId = NULL,
printTimes = FALSE,
useDcrc = TRUE,
useTte = TRUE,
useRf = TRUE
)Arguments
- connectionHandler
A connection handler that connects to the database and extracts sql queries. Create a connection handler via `ResultModelManager::ConnectionHandler$new()`.
- schema
The result database schema (e.g., 'main' for sqlite)
- cTablePrefix
The prefix used for the characterization results tables
- cgTablePrefix
The prefix used for the cohort generator results tables
- targetId
An integer corresponding to the target cohort ID
- printTimes
Print the time it takes to run each query
- useDcrc
look for outcome in dechal-rechal results
- useTte
look for outcome in time-to-event results
- useRf
look for outcome in risk-factor results
Value
A data.frame with the characterization outcome cohort ids, names and which characterization analyses the cohorts are used in.
See also
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getCaseBinaryFeatures(),
getCaseContinuousFeatures(),
getCaseCounts(),
getCaseTargetBinaryFeatures(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver
cohorts <- getCharacterizationOutcomes(
connectionHandler = connectionHandler,
schema = 'main'
)
#> [1] "Extracting characterization outcomes took: 0.075850248336792 secs"