f_date.Rd
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)
A vector of dates with class POSIXct
, POSIXt
, or Date
.
A character value specifying the format you want
the output to be in. See base::strptime()
for options.
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.