plot_do_curve {dropR} | R Documentation |
Plot Dropout Curves
Description
This functions uses ggplot2
to create drop out curves.
Please note that you should use add_dropout_idx()
and compute_stats()
on your
data before running this function as it needs a certain data structure and variables to
work properly.
Usage
plot_do_curve(
do_stats,
linetypes = TRUE,
stroke_width = 1,
full_scale = TRUE,
show_points = FALSE,
show_confbands = FALSE,
color_palette = "color_blind"
)
Arguments
do_stats |
data.frame containing dropout statistics table computed by |
linetypes |
boolean Should different line types be used? Defaults to TRUE. |
stroke_width |
numeric stroke width, defaults to 1. |
full_scale |
boolean Should y axis range from 0 to 100? Defaults to TRUE, FALSE cuts off at min percent remaining (>0). |
show_points |
boolean Should dropout curves show individual data points? Defaults to FALSE. |
show_confbands |
boolean Should there be confidence bands added to the plot? Defaults to FALSE. |
color_palette |
character indicating which color palette to use. Defaults to 'color_blind', alternatively choose 'gray' or 'default' for the ggplot2 default colors. |
Value
Returns a ggplot
object containing the dropout curve plot. Using the Shiny App version of
dropR, this plot can easily be downloaded in different formats.
See Also
add_dropout_idx()
and compute_stats()
which are necessary for the proper data structure.
Examples
do_stats <- compute_stats(add_dropout_idx(dropRdemo, 3:54),
by_cond = "experimental_condition",
no_of_vars = 52)
plot_do_curve(do_stats)