View source: R/dates_secuTrial.R
dates_secuTrial | R Documentation |
Converts dates and datetime variables to Date
or POSIXct
class, as appropriate.
dates_secuTrial(object, ...) ## S3 method for class 'secuTrialdata' dates_secuTrial(object, ...)
object |
|
... |
further parameters |
New variables are created appended with .date
or .datetime
.
This is a safety mechanism in case NAs are inadvertently introduced.
same as the original object with date variables converted to Date
s.
# prepare path to example export export_location <- system.file("extdata", "sT_exports", "lnames", "s_export_CSV-xls_CTU05_long_ref_miss_en_utf8.zip", package = "secuTrialR") # load all export data sT_export <- read_secuTrial_raw(data_dir = export_location) # prepare dates sT_export_dates <- dates_secuTrial(sT_export) # show parsed datetime example sT_export_dates$ctu05baseline$hiv_date.datetime[1] # [1] "2019-03-05 23:56:00 CET" # show parsed date example sT_export_dates$ctu05baseline$paracetamol_start.date[1] # [1] "2019-03-05"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.