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

update,DataParts-methodR Documentation

Update method for the "DataParts" class

Description

Add new data to the DataParts object

Usage

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

Arguments

object

the old DataParts 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

...

not used

Value

the new DataParts object

Examples


# create an object of class 'DataParts'
myData <- 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
# to be noted that since we reached the last level from part1Ladder then
# nextPart is switched from '1' to '2'
myData <- update(myData,
                 x=10,
                 y=c(0))



crmPack documentation built on June 26, 2024, 5:07 p.m.