f_date | R Documentation |
Format a date object the same as base::format()
but return a numerical
value when able instead of always returning a character string. Users
dictate what is returned by the same format
argument that is used in
base::format()
.
f_date(x, format = c("%m", "%Y"), factor = FALSE)
x |
A vector of dates with class |
format |
A character value specifying the format you want
the output to be in. See |
factor |
A logical specifying if you want a factor to be returned. The factor is ALWAYS limited to the levels that are available. The default behavior is to NOT return a factor. Thus, this must be invoked. |
A vector the same length as the input vector.
Kelli F. Johnson
base::format()
base::factor()
base::droplevels()
base::strptime()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.