Skip to contents

Function to identify the available plot types of an object.

Usage

plotTypes(
  obj,
  output = c("numeric", "caption", "numcap", "capnum"),
  numberInCaptionEnabled = FALSE
)

getAvailablePlotTypes(
  obj,
  output = c("numeric", "caption", "numcap", "capnum"),
  numberInCaptionEnabled = FALSE
)

Arguments

obj

The object for which the plot types shall be identified, e.g. produced by getDesignGroupSequential() or getSampleSizeMeans().

output

The output type. Can be one of c("numeric", "caption", "numcap", "capnum").

numberInCaptionEnabled

If TRUE, the number will be added to the caption, default is FALSE.

Value

Returns a list if option is either capnum or numcap

or returns a vector that is of character type for option=caption or of numeric type for option=numeric.

Details

plotTypes and getAvailablePlotTypes() are equivalent, i.e., plotTypes is a short form of getAvailablePlotTypes().

output:

  1. numeric: numeric output

  2. caption: caption as character output

  3. numcap: list with number and caption

  4. capnum: list with caption and number

Examples

design <- getDesignInverseNormal(kMax = 2)
getAvailablePlotTypes(design, "numeric")
#> [1] 1 3 4 5 6 7 8 9
plotTypes(design, "caption")
#> [1] "Boundaries"                                
#> [2] "Stage Levels"                              
#> [3] "Error Spending"                            
#> [4] "Power and Early Stopping"                  
#> [5] "Average Sample Size and Power / Early Stop"
#> [6] "Power"                                     
#> [7] "Early Stopping"                            
#> [8] "Average Sample Size"                       
getAvailablePlotTypes(design, "numcap")
#> $`1`
#> [1] "Boundaries"
#> 
#> $`3`
#> [1] "Stage Levels"
#> 
#> $`4`
#> [1] "Error Spending"
#> 
#> $`5`
#> [1] "Power and Early Stopping"
#> 
#> $`6`
#> [1] "Average Sample Size and Power / Early Stop"
#> 
#> $`7`
#> [1] "Power"
#> 
#> $`8`
#> [1] "Early Stopping"
#> 
#> $`9`
#> [1] "Average Sample Size"
#> 
plotTypes(design, "capnum")
#> $Boundaries
#> [1] 1
#> 
#> $`Stage Levels`
#> [1] 3
#> 
#> $`Error Spending`
#> [1] 4
#> 
#> $`Power and Early Stopping`
#> [1] 5
#> 
#> $`Average Sample Size and Power / Early Stop`
#> [1] 6
#> 
#> $Power
#> [1] 7
#> 
#> $`Early Stopping`
#> [1] 8
#> 
#> $`Average Sample Size`
#> [1] 9
#>