update-DataParts-method: Updating 'DataParts' Objects

update,DataParts-methodR Documentation

Updating DataParts Objects

Description

[Stable]

A method that updates existing DataParts object with new data.

Usage

## S4 method for signature 'DataParts'
update(object, x, y, ..., check = TRUE)

Arguments

object

(DataParts)
object you want to update.

x

(number)
the dose level (one level only!).

y

(integer)
the DLT vector (0/1 vector) for all patients in this cohort. You can also supply numeric vectors, but these will then be converted to integer internally.

...

further arguments passed to Data update method update-Data.

check

(flag)
whether the validation of the updated object should be conducted. See help for update-Data for more details on the use case of this parameter.

Value

The new, updated DataParts object.

Examples

# Create an object of class 'DataParts'.
my_data <- DataParts(
  x = c(0.1, 0.5, 1.5),
  y = c(0, 0, 0),
  doseGrid = c(0.1, 0.5, 1.5, 3, 6, seq(from = 10, to = 80, by = 2)),
  part = c(1L, 1L, 1L),
  nextPart = 1L,
  part1Ladder = c(0.1, 0.5, 1.5, 3, 6, 10)
)

# Update the data with a new cohort.
# Note that since we reached the last level from 'part1Ladder'
# then the 'nextPart' is switched from '1' to '2'.
my_data1 <- update(my_data, x = 10, y = 0L)
my_data1

Roche/crmPack documentation built on April 30, 2024, 3:19 p.m.