Skip to contents

The DataJoint class handles combining data from a DataSurvival object and a DataLongitudinal object.

Usage

DataJoint(subject, survival = NULL, longitudinal = NULL)

Arguments

subject

(DataSubject) object created by DataSubject().

survival

(DataSurvival) object created by DataSurvival().

longitudinal

(DataLongitudinal) object created by DataLongitudinal().

Value

A DataJoint object.

Slots

subject

(DataSubject)
See Argument for details.

survival

(DataSurvival)
See Argument for details.

longitudinal

(DataLongitudinal)
See Argument for details.

Examples

subjects <- data.frame(id = c("1", "2"), arm = "A", study = "S")
survival <- data.frame(id = c("1", "2"), time = c(5, 8), event = c(1, 0))
longitudinal <- data.frame(
  id = rep(c("1", "2"), each = 2),
  time = rep(c(0, 1), 2),
  response = c(10, 9, 12, 11)
)
DataJoint(
  DataSubject(subjects, "id", "arm", "study"),
  DataSurvival(survival, Surv(time, event) ~ 1),
  DataLongitudinal(longitudinal, response ~ time)
)
#> 
#>  Joint-Data Object Containing:
#> 
#>       Subject-Data Object:
#>           # of Subjects = 2
#>           # of Studies  = 1
#>           # of Arms     = 1
#> 
#>       Survival-Data Object:
#>           # of Rows     = 2
#>           # of Columns  = 3
#>           # of Events   = 1
#>           Formula       = Surv(time, event) ~ 1
#> 
#>       Longitudinal-Data Object:
#>           # of Rows     = 4
#>           # of Columns  = 3
#>           # of Cen-Obvs = 0
#>           Formula       = response ~ time 
#>