Learn R Programming

rpact (version 5.0.0)

delete: Delete an Object from a Collection

Description

S3 generic for removing objects. The TrialComparison method delegates to $delete() and modifies the existing comparison by reference.

The TrialComparison method deletes one contained object by position or name.

Usage

delete(x, ...)

# S3 method for TrialComparison delete(x, ...)

Value

The modified comparison for TrialComparison.

Arguments

x

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

...

For TrialComparison, exactly one index, supplied by position or name: a positive integer position or an exact object name. Invalid selections leave the comparison unchanged. Removing the last object leaves an empty comparison.

See Also

getComparison(), add()

Examples

Run this code
comparison <- getComparison(
    fixed = getDesignFixed(),
    sequential = getDesignGroupSequential(kMax = 2)
)
comparison |> delete("fixed")
comparison |> delete(index = 1)
comparison |>
    add(getDesignFixed()) |>
    delete(1)

Run the code above in your browser using DataLab