View source: R/CharacterizationPlots.R
plotSexDistributions | R Documentation |
Creates bar charts for the target and case sex.
plotSexDistributions(
sexData,
riskWindowStart = "1",
riskWindowEnd = "365",
startAnchor = "cohort start",
endAnchor = "cohort start"
)
sexData |
The sex data extracted using 'getCharacterizationDemographics(type = 'sex')' |
riskWindowStart |
The time at risk window start |
riskWindowEnd |
The time at risk window end |
startAnchor |
The anchor for the time at risk start |
endAnchor |
The anchor for the time at risk end |
Input the data returned from 'getCharacterizationDemographics(type = 'sex')' and the time-at-risk
Returns a ggplot with the distributions
Other Characterization:
getBinaryCaseSeries()
,
getBinaryRiskFactors()
,
getCaseBinaryFeatures()
,
getCaseContinuousFeatures()
,
getCaseCounts()
,
getCharacterizationDemographics()
,
getContinuousCaseSeries()
,
getContinuousRiskFactors()
,
getDechallengeRechallenge()
,
getIncidenceRates()
,
getTargetBinaryFeatures()
,
getTargetContinuousFeatures()
,
getTargetCounts()
,
getTimeToEvent()
,
plotAgeDistributions()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
sexData <- getCharacterizationDemographics(
connectionHandler = connectionHandler,
schema = 'main',
targetId = 1,
outcomeId = 3,
type = 'sex'
)
plotSexDistributions(sexData = sexData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.