A dataset showcasing various date formats and patient-related information. It appears designed to test or demonstrate date parsing and handling capabilities, as well as general data manipulation.
Usage
data(date_formats)
Format
A data frame with 40 rows and 15 variables:
- PatientID
Character. Unique patient identifier.
- StartDate
Date. A start date, likely for a treatment or observation period.
- Duration
Numeric. Duration, possibly in days or months, related to an event or period.
- Age
Numeric. Patient's age.
- Weight
Numeric. Patient's weight.
- ECOG
Integer. ECOG (Eastern Cooperative Oncology Group) performance status score.
- PriorTherapy
Character. Information about prior therapies (e.g., "Yes", "No", type of therapy).
- EndDate
Date. An end date, corresponding to the StartDate.
- BestResponse
Character. Best response to treatment (e.g., "CR", "PR", "SD", "PD").
- StartDate_YMD
Date. Start date in Year-Month-Day format.
- StartDate_DMY
Date. Start date in Day-Month-Year format.
- StartDate_MDY
Date. Start date in Month-Day-Year format.
- EndDate_YMD
Date. End date in Year-Month-Day format.
- EndDate_DMY
Date. End date in Day-Month-Year format.
- EndDate_MDY
Date. End date in Month-Day-Year format.
Examples
data(date_formats)
str(date_formats)
#> 'data.frame': 40 obs. of 15 variables:
#> $ PatientID : chr "PT001" "PT002" "PT003" "PT004" ...
#> $ StartDate : Date, format: "2020-01-02" "2020-02-18" ...
#> $ Duration : num 473 264 458 299 784 ...
#> $ Age : num 53 49 39 53 44 62 60 82 52 58 ...
#> $ Weight : num 50 61 97 86 66 58 88 73 71 38 ...
#> $ ECOG : int 2 1 0 0 0 0 2 0 0 1 ...
#> $ PriorTherapy : chr "No" "Yes" "No" "Yes" ...
#> $ EndDate : Date, format: "2021-04-19" "2020-11-08" ...
#> $ BestResponse : chr "PR" "PR" "CR" "SD" ...
#> $ StartDate_YMD: Date, format: "2020-01-02" "2020-02-18" ...
#> $ StartDate_DMY: Date, format: "2020-01-02" "2020-02-18" ...
#> $ StartDate_MDY: Date, format: "2020-01-02" "2020-02-18" ...
#> $ EndDate_YMD : Date, format: "2021-04-19" "2020-11-08" ...
#> $ EndDate_DMY : Date, format: "2021-04-19" "2020-11-08" ...
#> $ EndDate_MDY : Date, format: "2021-04-19" "2020-11-08" ...
head(date_formats[, 1:8]) # Show first few columns due to width
#> PatientID StartDate Duration Age Weight ECOG PriorTherapy EndDate
#> 1 PT001 2020-01-02 473 53 50 2 No 2021-04-19
#> 2 PT002 2020-02-18 264 49 61 1 Yes 2020-11-08
#> 3 PT003 2020-01-02 458 39 97 0 No 2021-04-04
#> 4 PT004 2020-01-13 299 53 86 0 Yes 2020-11-07
#> 5 PT005 2020-01-24 784 44 66 0 Yes 2022-03-18
#> 6 PT006 2020-02-18 409 62 58 0 No 2021-04-02
summary(date_formats$Age)
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 36.00 49.75 57.50 59.10 72.50 84.00
table(date_formats$BestResponse)
#>
#> CR PD PR SD
#> 10 11 10 9