transformToDateString | R Documentation |
takes a 'Date' object or an integer and converts it to a character vector of a specified format. Also changes NA's into a specified alternative
transformToDateString(
aDate,
formatString = "%d/%m/%Y",
origin = "1970-01-01",
na.alternative = NA
)
aDate |
date vector or integer vector (days since origin) |
formatString |
defines the formatting of the date vector, internally the base::as.Date function is used (via integerToDate) |
origin |
character vector specifying the origin date (only used if aDate argument is an integer) |
na.alternative |
specifies what to use for NA elements in the aDate argument transformData(transformationFormula = "transformToDate(data, na.alternative = '-')") transformToDate(c(Sys.Date(),NA, Sys.Date()+1)) transformToDate(c(Sys.Date(),NA, Sys.Date()+1), na.alternative = "-") |
character vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.