format_yw {dint} | R Documentation |
Coerce and Format to Year-Isoweek Strings
Description
Coerce and Format to Year-Isoweek Strings
Usage
format_yw(x, w = NULL, format = "%Y-W%V")
Arguments
x , w |
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_yq()
Examples
format_yw(2015, 5)
format_yw(201505, format = "%Y.%V")
format_yw(as_date_yw(201505), format = "%y.%V")