View source: R/CharacterzationQueries.R
| getTargetCounts | R Documentation |
This function extracts target cohort counts across databases in the results for specified target.
getTargetCounts(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
characterizationTargetIds = NULL,
databaseIds = NULL,
includeNames = TRUE
)
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 |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
characterizationTargetIds |
The characterization target cohort ids of interest |
databaseIds |
(optional) A vector of database IDs to restrict to |
includeNames |
whether to add the database names and cohort names |
Specify the connectionHandler, the schema and the characterization target IDs
Returns a data.frame with the columns:
settingId the setting id
databaseId the unique identifier of the database
characterizationTargetId the target cohort unique identifier
N the number of people in the cohort
Other Characterization:
characterizationCompareBinary(),
characterizationCompareContinuous(),
getAggregateBinaryRiskFactors(),
getAggregateContinuousRiskFactors(),
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCharacterizationCaseSettings(),
getCharacterizationDemographics(),
getCharacterizationTargetSettings(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getContinuousTargetBaseline(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceRates(),
getIncidenceTargetSettings(),
getNonCaseCounts(),
getOutcomesUsedInCharacterization(),
getOutcomesUsedInIncidence(),
getTargetsUsedInCharacterization(),
getTargetsUsedInIncidence(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
cc <- getTargetCounts(
connectionHandler = connectionHandler,
schema = 'main'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.