patientTimelines | R Documentation |
A dataset containing simulated patient timeline data for clinical oncology research. This dataset represents typical patient journeys through cancer treatment, including diagnosis, treatment, response assessment, and outcomes. The data simulates a realistic clinical study where patients enroll at different timepoints and have varied treatment durations and outcomes.
patientTimelines
A data frame with 30 rows and 15 variables:
Patient identifier, formatted as PT001, PT002, etc.
Numeric. Time at which observation began, varies between patients to represent staggered enrollment (some values greater than 0)
Numeric. Time at which observation ended, in the same units as StartTime
Factor with levels: CR (Complete Response), PR (Partial Response), SD (Stable Disease), PD (Progressive Disease), NE (Not Evaluable)
Numeric. Time of surgery relative to study start. May be negative for surgeries that occurred before enrollment
Numeric. Time when treatment began relative to study start
Numeric. Time of response assessment relative to study start
Numeric. Time of disease progression, NA if no progression
Numeric. Time of death, NA if patient alive at last follow-up
Factor with levels: High, Medium, Low. Risk classification for the patient
Numeric. Patient age in years
Integer (0-3). ECOG performance status
Numeric. Duration of response, calculated as Progression - ResponseAssessment
Numeric. Total duration of follow-up, from StartTime to EndTime
There is also a date-based version of this dataset where time variables are represented as actual dates instead of numeric values, named 'patientTimelinesDates'.
data(patientTimelines)
# Show staggered entry of patients into the study
hist(patientTimelines$StartTime,
main = "Patient Enrollment Times",
xlab = "Start Time")
# Basic swimmer plot
swimmerplot(
data = patientTimelines,
patientID = "PatientID",
start = "StartTime",
end = "EndTime",
event = "BestResponse"
)
# With milestones
swimmerplot(
data = patientTimelines,
patientID = "PatientID",
start = "StartTime",
end = "EndTime",
event = "BestResponse",
milestone1Name = "Surgery",
milestone1Date = "Surgery",
milestone2Name = "Treatment",
milestone2Date = "TreatmentStart"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.