Learn R Programming

curtailment (version 0.2.6)

drawDiagramGeneric: drawDiagramGeneric

Description

drawDiagramGeneric

Usage

drawDiagramGeneric(n, go, nogo, xmax = NULL, ymax = NULL, ylab = NULL)

Value

An object of class ggplot, showing a visualisation of the maximum sample size and inputted stopping boundaries.

Arguments

n

Maximum sample size

go

Two-column matrix detailing stopping boundaries for a go decision or efficacy stopping, where the first column contains the number of responses and the second column contains the corresponding number of participants so far.

nogo

Two-column matrix detailing stopping boundaries for a no go decision or futility stopping, where the first column contains the number of responses and the second column contains the corresponding number of participants so far.

xmax

Optional. Maximum value for x axis.

ymax

Optional. Maximum value for y axis.

ylab

Optional. Label for y axis.

Examples

Run this code
 go <- cbind(6:8, rep(8,3))
 nogo <- cbind(0:5, rep(8,6))
 drawDiagramGeneric(n=8, go=go, nogo=nogo, ylab="Number of successes")

Run the code above in your browser using DataLab