Learn R Programming

gsbDesign (version 1.0-3)

tab: get tables.

Description

This function creates tables from the output of function gsb().

Usage

tab(x,
    what=c("all", "cumulative all", "success", "futility",
           "indeterminate", "success or futility", 
           "cumulative success", "cumulative futility",
           "cumulative indeterminate", "cumulative success or futility",
           "sample size"),
    atDelta = "default",
    wide=FALSE,
    digits = 3,
    export = FALSE,
    sep = ",",
    path = tempdir())

Value

Returns a matrix with the results from the output of function

gsb().

Arguments

x

object of class gsbMainOut which is returned by the function gsb().

what

string to specify the content of the table. It should correspond one level of OC$type in the output of gsb().

atDelta

if "default" the table shows the operating characteristics evaluated at the actually calculated true values entered in argument truth of function gsbSimulation. Alternatively a numeric of arbitrary length can be entered. Then the operating characteristics are displayed for the true value delta entered in this numeric using a linear interpolation. This only works if type.update = "treatment effect".

wide

logical. If TRUE a zable in wide format is produced. Only possible if grid.type = "table".

digits

numeric of length 1 specifying the number of digits which should be displayed in the table. The function round() is used. If what = "sample size" and digits = 0, the function uses ceiling() instead.

export

logical. if TRUE the table is exported and saved as .cvs-file.

sep

character. the field separator string. if the table is exported the values are separated by this string.

path

character. to specify the location to which to table should be exported. the default 'tempdir()' exports the table to a temporary directory.

Author

Florian Gerber <florian.gerber@math.uzh.ch>

Examples

Run this code
## please see examples of function 'gsb'.

Run the code above in your browser using DataLab