Plot the distribution of follow-up time
Usage
plotFollowUpDistribution(
population,
targetLabel = "Target",
comparatorLabel = "Comparator",
yScale = "percent",
logYScale = FALSE,
dataCutoff = 0.95,
title = NULL,
fileName = NULL
)
Arguments
- population
A data frame describing the study population as created using the
createStudyPopulation
function. This should at least have these columns: treatment, timeAtRisk.- targetLabel
A label to us for the target cohort.
- comparatorLabel
A label to us for the comparator cohort.
- yScale
Should be either 'percent' or 'count'.
- logYScale
Should the Y axis be on the log scale?
- dataCutoff
Fraction of the data (number censored) after which the graph will not be shown.
- title
The main title of the plot.
- fileName
Name of the file where the plot should be saved, for example 'plot.png'. See the function
ggsave
in the ggplot2 package for supported file formats.
Value
A ggplot object. Use the ggsave
function to save to file in a different
format.