format_yq {dint} | R Documentation |
Coerce and Format to Year-Quarter Strings
Description
Coerce and Format to Year-Quarter Strings
Usage
format_yq(x, q = NULL, format = "%Y-Q%q")
Arguments
x , q |
Two integer (vectors).
| ||||||||||||
format |
A format that uses a subset of the same placeholders as
Not all placeholders are supported for all |
Value
a character
vector
Formatting shorthands
Format shorthand functions in the form of format_y*_[preset]()
directly
apply formatting presets to anything that can be coerced to a date_xx
.
This is notably handy as they can be used as a labeling function for
ggplot2 axes (see vignette("dint")
)
See Also
Other coerce and format functions:
format_ym()
,
format_yw()
Examples
format_yq(2015, 1)
format_yq(20151, format = "short")
format_yq(20151, format = "shorter")