Learn R Programming

crmPack (version 2.0.0)

update,DataDA-method: Updating DataDA Objects

Description

[Stable]

A method that updates existing DataDA object with new data.

Usage

# S4 method for DataDA
update(object, u, t0, trialtime, y, ..., check = TRUE)

Value

The new, updated DataDA object.

Arguments

object

(DataDA)
object you want to update.

u

(numeric)
the new DLT free survival times for all patients, i.e. for existing patients in the object as well as for new patients.

t0

(numeric)
the time that each patient starts DLT observation window. This parameter covers all patients, i.e. existing patients in the object as well as for new patients.

trialtime

(number)
current time in the trial, i.e. a followup time.

y

(numeric)
the new DLTs for all patients, i.e. for existing patients in the object as well as for new patients.

...

further arguments passed to Data update method update-Data. These are used when there are new patients to be added to the cohort.

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.

Examples

Run this code
# Create an object of class 'DataDA'.
my_data <- DataDA(
  x = c(0.1, 0.5, 1.5, 3, 6, 10, 10, 10),
  y = c(0, 0, 1, 1, 0, 0, 1, 0),
  doseGrid = c(0.1, 0.5, 1.5, 3, 6, seq(from = 10, to = 80, by = 2)),
  u = c(42, 30, 15, 5, 20, 25, 30, 60),
  t0 = c(0, 15, 30, 40, 55, 70, 75, 85),
  Tmax = 60
)

# Update the data.
my_data1 <- update(
  object = my_data,
  y = c(my_data@y, 0), # The 'y' will be updated according to 'u'.
  u = c(my_data@u, 20),
  t0 = c(my_data@t0, 95),
  x = 20,
  trialtime = 120 # This is the global timeline for a trial.
)
my_data1

Run the code above in your browser using DataLab