plotDemographics {PatientProfiles} | R Documentation |
Plot summariseDemographics output.
Description
'r lifecycle::badge("deprecated")'
Usage
plotDemographics(
data,
xAxis = "variable_name",
yAxis = "estimate_value",
plotStyle = "barplot",
facetVarX = "variable_name",
facetVarY = c("group_level", "strata_level"),
colorVars = "variable_level",
vertical_x = FALSE
)
Arguments
data |
output of summariseCharacteristics. |
xAxis |
what to plot on x axis, default as variable_name column. Has to be a column in data. |
yAxis |
what to plot on y axis, default as estimate_value column. Has to be a column in data. One of the xAxis or yAxis has to be estimate_value. |
plotStyle |
Now allows boxplot or barplot only. |
facetVarX |
column in data to facet by on horizontal axis |
facetVarY |
column in data to facet by on vertical axis |
colorVars |
column in data to color by. |
vertical_x |
whether to display x axis string vertically. |
Value
A ggplot.
Examples
library(PatientProfiles)
cdm <- mockPatientProfiles()
results <- summariseDemographics(
cohort = cdm$cohort1,
ageGroup = list(c(0, 19), c(20, 39), c(40, 59), c(60, 79), c(80, 150))
)
graph <- plotDemographics(results)
CDMConnector::cdmDisconnect(cdm = cdm)
[Package PatientProfiles version 0.8.0 Index]