View source: R/class_trial_comparison.R
| as.data.frame.TrialComparison | R Documentation |
Converts a trial comparison to a data frame, optionally prepared for reporting.
## S3 method for class 'TrialComparison'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
...,
niceColumnNamesEnabled = FALSE,
includeAllParameters = FALSE,
harmonizeColumnNames = TRUE,
removeConstantParameters = FALSE,
transposed = FALSE,
removeVariableParameters = FALSE,
digits = NA_integer_,
ceilingEnabled = FALSE,
output = "data.frame"
)
x |
A |
row.names |
Optional row names for the result. |
optional |
Unused; included for compatibility with |
... |
Further arguments. Currently unused. |
niceColumnNamesEnabled |
Logical. If |
includeAllParameters |
If |
harmonizeColumnNames |
If |
removeConstantParameters |
If |
transposed |
If |
removeVariableParameters |
If |
digits |
Integer number of decimal places for numeric parameters, or |
ceilingEnabled |
If |
output |
Output mode: |
With harmonizeColumnNames = TRUE, fixed-plan sample size columns are harmonized when the comparison includes
interim analyses: nFixed, nFixed1, and nFixed2 become numberOfSubjects,
numberOfSubjects1, and numberOfSubjects2. Fixed survival events use
cumulativeEventsPerStage in mixed comparisons with interim analyses.
Available sample-size H1 expectations use expectedNumberOfSubjects and
expectedNumberOfEvents, referring to each scenario's supplied alternative.
See getComparison() for the class-specific rules and reference values.
Shared profiles use the same exact comparison as summary.TrialComparison(),
applied to the selected harmonized or original columns. The summary's
harmonizeColumnNames argument can be set independently of this data-frame option.
Filtering precedes rounding, readable labels and transposition. Common scalar
parameters are returned once; common stage or situation profiles retain their
coordinates. Reporting modes render HTML in a horizontally scrollable container
or LaTeX longtables split into column blocks with repeated identifier columns.
LaTeX output requires the suggested rmarkdown package and registers the longtable
dependency through knitr metadata. Other knitting targets use ordinary data-frame
output. Reporting does not modify the comparison or its contained objects.
Multi-arm survival simulations use categoryType and category coordinates.
comparison rows (for example, Treatment 1 vs. Control) contain stage-wise
and cumulative event counts for treatment plus control. arm rows contain
individual-arm events, selections, rejections and drop-out summaries, including
a separate Control category. Arm-independent simulation results occur on
overall / All arms rows. Input and design settings remain available for
grouping. Result cells outside their applicable category are NA.
The unfiltered data frame retains this expanded structure for plotting and
grouping. Parameter filters use semantically normalized profiles: design
settings do not acquire an arm dimension from repeated rows, whereas arm-level
results retain their group domain even if all values are equal. Shared output
combines the observed coordinate domains of the common profiles, without
constructing new combinations or taking the first object's row layout.
Scalars and lower-dimensional profiles are repeated only on compatible
observed coordinates. Shared scalar-only output omits coordinate columns.
A data.frame, unrounded and with all columns by default. Reporting modes
additionally inherit from TrialComparisonTable for automatic knitr output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.