View source: R/reverse_survival_aux.R
decimal_anydate | R Documentation |
Converts a date of multiple formats (year, year-month, year-month-day) to decimal
decimal_anydate(date)
date |
date in the format Y-m-d or string in the formats Y, Y-m, Y-m-d |
decimal of date's year
date1 <- '2011'
# converts date1 for decimal value of '2011-07-31'
decimal_anydate(date1)
date2 <- '2009-05'
# converts date2 for decimal value of '2009-05-15'
decimal_anydate(date2)
date3 <- '2013-10-31'
# converts date3 for decimal value of '2013-10-31'
decimal_anydate(date3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.