View source: R/CharacterzationQueries.R
getTargetCounts | R Documentation |
This function extracts target cohort counts across databases in the results for specified target and outcome cohorts.
getTargetCounts(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
outcomeIds = NULL
)
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') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
rowCount the number of entries in the cohort
personCount the number of people in the cohort
minPriorObservation the minimum required observation days prior to index for an entry
outcomeWashoutDays patients with the outcome occurring within this number of days prior to index are excluded (NA means no exclusion)
Other Characterization:
getBinaryCaseSeries()
,
getBinaryRiskFactors()
,
getCaseBinaryFeatures()
,
getCaseContinuousFeatures()
,
getCaseCounts()
,
getCharacterizationDemographics()
,
getContinuousCaseSeries()
,
getContinuousRiskFactors()
,
getDechallengeRechallenge()
,
getIncidenceRates()
,
getTargetBinaryFeatures()
,
getTargetContinuousFeatures()
,
getTimeToEvent()
,
plotAgeDistributions()
,
plotSexDistributions()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
tc <- getTargetCounts(
connectionHandler = connectionHandler,
schema = 'main'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.