Learn R Programming

rpact (version 5.0.0)

getObjects: 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 TrialComparison getObjects(x, ...)

Value

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

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.

See Also

getComparison(), compare()

Examples

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

Run the code above in your browser using DataLab