plotNetBenefit | R Documentation |
Plot the net benefit
plotNetBenefit(
plpResult,
typeColumn = "evaluation",
saveLocation = NULL,
fileName = "netBenefit.png",
evalType = NULL,
ylim = NULL,
xlim = NULL
)
plpResult |
A plp result object as generated using the |
typeColumn |
The name of the column specifying the evaluation type |
saveLocation |
Directory to save plot (if NULL plot is not saved) |
fileName |
Name of the file to save to plot, for example 'plot.png'. See the function |
evalType |
Which evaluation type to plot for. For example |
ylim |
The y limits for the plot, if NULL the limits are calculated from the data |
xlim |
The x limits for the plot, if NULL the limits are calculated from the data |
A list of ggplot objects or a single ggplot object if only one evaluation type is plotted
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n=1000)
saveLoc <- file.path(tempdir(), "plotNetBenefit")
results <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
plotNetBenefit(results)
# clean up
unlink(saveLoc, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.