patientTimelinesDates | R Documentation |
A dataset containing simulated patient timeline data for clinical oncology research, with time variables represented as actual dates. 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 over a 6-month period and have varied treatment durations and outcomes.
patientTimelinesDates
A data frame with 30 rows and 15 variables:
Patient identifier, formatted as PT001, PT002, etc.
Date. Date at which observation began, varies across patients to represent staggered enrollment
Date. Date at which observation ended
Factor with levels: CR (Complete Response), PR (Partial Response), SD (Stable Disease), PD (Progressive Disease), NE (Not Evaluable)
Date. Date of surgery, may be before the study enrollment date
Date. Date when treatment began
Date. Date of response assessment
Date. Date of disease progression, NA if no progression
Date. Date 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 in days, calculated as Progression - ResponseAssessment
Numeric. Total duration of follow-up in days, from StartDate to EndDate
This is the date-based version of the patientTimelines dataset.
data(patientTimelinesDates)
# Show staggered entry of patients into the study
hist(as.numeric(patientTimelinesDates$StartDate - min(patientTimelinesDates$StartDate)),
main = "Patient Enrollment Days from Study Start",
xlab = "Days")
# Basic swimmer plot with date data
swimmerplot(
data = patientTimelinesDates,
patientID = "PatientID",
start = "StartDate",
end = "EndDate",
event = "BestResponse",
timetype = "datetime",
timetypedata = "ymd",
timetypeoutput = "months"
)
# With absolute time display to show the actual enrollment pattern
swimmerplot(
data = patientTimelinesDates,
patientID = "PatientID",
start = "StartDate",
end = "EndDate",
event = "BestResponse",
timetype = "datetime",
timetypedata = "ymd",
timetypeoutput = "months",
startType = "absolute"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.