Learn R Programming

cg (version 1.0-3)

print.cgPairedDifferenceSampleSizeTable: Print a Paired Difference Sample Size Table object with some format options

Description

Print a cgPairedDifferenceSampleSizeTable object, which contains a table of sample size estimates based on a cgPairedDifferenceFit object.

Usage

"print"(x, title=NULL, endptname=NULL, ...)

Arguments

x
A cgPairedDifferenceSampleSizeTable object, typically created by samplesizeTable.cgPairedDifferenceFit.
title
The title for the table. If NULL, it is set to be "Sample Size Table from" concatenated to planningname value in the settings slot of the cgPairedDifferenceSampleSizeTable object.
endptname
The endpoint name, printed out with the table. If NULL, it is set to the endptname value from the settings slot of the cgPairedDifferenceSampleSizeTable object.
...
Additional arguments. None are currently defined.

Value

print.cgPairedDifferenceSampleSizeTable returns invisible. The main purpose is the side effect of printing to the current output connection, which is typically the console.

Details

The object is printed using a mix of cat and print calls. See cgPairedDifferenceSampleSizeTable for details of the *.sstable and other object slots.

See Also

cgPairedDifferenceSampleSizeTable

Examples

Run this code
data(anorexiaFT)

anorexiaFT.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
                                                 analysisname="Anorexia FT",
                                                 endptname="Weight",
                                                 endptunits="lbs",
                                                 expunitname="Patient",
                                                 digits=1,
                                                 logscale=TRUE)

anorexiaFT.fit <- fit(anorexiaFT.data)

## The interest is in increased weight for the anorexia FT
## (family treatment) group of patients

anorexiaFT.samplesize <- samplesizeTable(anorexiaFT.fit, direction="increasing",
                         mmdvec=c(5, 10, 15, 20), display="none")

print(anorexiaFT.samplesize)

## The above two calls produce the same screen output as
samplesizeTable(anorexiaFT.fit, direction="increasing",
                mmdvec=c(5, 10, 15, 20))

## since the default in the call is display="print"

Run the code above in your browser using DataLab