| [[.TrialComparison | R Documentation |
Extracts a contained comparison object by name or position.
$ accesses named comparison objects while preserving public R6 members.
## S3 method for class 'TrialComparison'
x[[i, ..., exact = TRUE]]
## S3 method for class 'TrialComparison'
x$name
x |
A |
i |
A single object name or a positive integer position. |
... |
Further indices are not supported. |
exact |
Whether character indices must match exactly, as for list |
name |
An object name, supplied literally after |
Object names are unique. Numeric positions refer to the
stored object order. R6 members take precedence for $: x$add is the method
even when an object is named "add"; use x[["add"]] to select that object.
[[ selects contained objects first and falls back to existing R6 members for
other character names. This also preserves existing internal field access.
These methods provide extraction; replacing collection entries is not supported.
Use getComparison() or $add() to build or extend the collection.
The contained object by reference, or NULL for an unknown name.
comparison <- getComparison(
fixed = getDesignFixed(),
sequential = getDesignGroupSequential(kMax = 2)
)
identical(comparison$fixed, comparison[["fixed"]])
identical(comparison[[1]], comparison$fixed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.