Generic function to plot a TrialDesignSummaries
object.
Usage
# S3 method for class 'TrialDesignSummaries'
plot(x, ..., type = 1L, grid = 1)
Arguments
- x
a
TrialDesignSummaries
object to plot.- ...
further arguments passed to or from other methods.
- type
The plot type (default =
1
). The following plot types are available:1
: creates a 'Boundaries' plot3
: creates a 'Stage Levels' plot4
: creates a 'Error Spending' plot5
: creates a 'Power and Early Stopping' plot6
: creates an 'Average Sample Size and Power / Early Stop' plot7
: creates an 'Power' plot8
: creates an 'Early Stopping' plot9
: creates an 'Average Sample Size' plot"all"
: creates all available plots and returns it as a grid plot or list
- grid
An integer value specifying the output of multiple plots. By default (
1
) a list ofggplot
objects will be returned. If agrid
value > 1 was specified, a grid plot will be returned if the number of plots is <= specifiedgrid
value; a list ofggplot
objects will be returned otherwise. Ifgrid = 0
is specified, all plots will be created usingprint
command and a list ofggplot
objects will be returned invisible. Note that one of the following packages must be installed to create a grid plot: 'ggpubr', 'gridExtra', or 'cowplot'.