getObjects: Get Objects from a Collection

View source: R/class_trial_comparison.R

getObjectsR Documentation

Get Objects from a Collection

Description

S3 generic for retrieving the objects contained in a collection. The TrialComparison method delegates to ⁠$getObjects()⁠.

The TrialComparison method returns the list of contained objects.

Usage

getObjects(x, ...)

## S3 method for class 'TrialComparison'
getObjects(x, ...)

Arguments

x

An object supporting a getObjects() method, such as a TrialComparison.

...

Further arguments. Currently unused for TrialComparison.

Details

The returned list contains references to the original R6 objects. Changing a contained object affects subsequent comparisons. Replacing or removing entries in the returned list does not change the comparison's membership; use add() and delete() to modify the collection.

Value

For TrialComparison, the list of contained objects in their stored order, retaining supplied names, or an empty list for an empty comparison.

See Also

getComparison(), compare()

Examples

comparison <- getComparison(
    fixed = getDesignFixed(),
    sequential = getDesignGroupSequential(kMax = 2)
)
objects <- comparison |> getObjects()
names(objects)
identical(objects$fixed, comparison$fixed)


rpact documentation built on Nov. 17, 2026, 1:07 a.m.