update-Data-method: Update method for the "Data" class

update,Data-methodR Documentation

Update method for the "Data" class

Description

Add new data to the Data object

Usage

## S4 method for signature 'Data'
update(
  object,
  x,
  y,
  ID = (if (length(object@ID)) max(object@ID) else 0L) + seq_along(y),
  newCohort = TRUE,
  ...
)

Arguments

object

the old Data object

x

the dose level (one level only!)

y

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

ID

the patient IDs

newCohort

logical: if TRUE (default) the new data are assigned to a new cohort

...

not used

Value

the new Data object

Examples


# Create some data of class 'Data'
myData <- Data(x=c(0.1,0.5,1.5,3,6,10,10,10),
               y=c(0,0,0,0,0,0,1,0),
               doseGrid=c(0.1,0.5,1.5,3,6,
                          seq(from=10,to=80,by=2)))

## update the data with a new cohort
myData <- update(myData,
                 x=20,
                 y=c(0,1,1))



crmPack documentation built on Sept. 3, 2022, 1:05 a.m.