update-DataCombo-method: Updating 'DataCombo' Objects

update,DataCombo-methodR Documentation

Updating DataCombo Objects

Description

[Experimental]

A method that updates existing DataCombo object with new data.

Usage

## S4 method for signature 'DataCombo'
update(
  object,
  x,
  y,
  response = rep(NA_integer_, length(y)),
  ID = length(object@ID) + seq_along(y),
  new_cohort = TRUE,
  check = TRUE,
  backfill = FALSE,
  cohort = NULL,
  ...
)

Arguments

object

(DataCombo)

x

(numeric) named dose combination with one entry for each drug. Names must match object@drugNames.

y

(integer) the DLT vector (0/1 vector) for all patients in this cohort.

response

(integer) the efficacy response vector (0/1 vector). May contain NA.

ID

(integer) the patient IDs.

new_cohort

(flag) if TRUE (default) the new data are assigned to a new cohort.

check

(flag) whether the validation of the updated object should be conducted.

backfill

(flag) whether the new patients being added are from a backfill cohort.

cohort

(int) if provided, the new patients will be assigned to this cohort index. If NULL (default), the cohort index will be determined based on the new_cohort parameter.

...

not used.

Value

The new, updated DataCombo object.

Examples

# Create some data of class 'DataCombo'.
my_data <- DataCombo(
  x = cbind(
    drug1 = c(10, 10, 10, 20, 20, 20),
    drug2 = c(20, 20, 20, 20, 20, 20)
  ),
  y = c(0, 0, 1, 0, 0, 0),
  doseGrid = list(drug1 = c(10, 20, 30), drug2 = c(20, 40))
)

# Update the data with a new cohort.
my_data1 <- update(
  my_data,
  x = c(drug1 = 30, drug2 = 40),
  y = c(0L, 1L, 0L)
)
my_data1

crmPack documentation built on July 5, 2026, 9:06 a.m.