format_pin {sweidnumbr} | R Documentation |
Formatting pin
Description
Format pin
for pretty printing
Usage
format_pin(x, format. = "%Y%m%d%N", ...)
Arguments
x |
vector of class "pin" (see |
format. |
character string specifying the output format.
|
... |
arguments passed to |
Value
character vector of same length as x
Examples
x <- as.pin(fake_pins$pin[1:10])
# Separate elements with hyphens:
format_pin(x, "%Y-%m-%d-%N")
# Separate even further
format_pin(x, "%C-%y-%m-%d-%N")
# The special P-format for maximal readability
format_pin(x, "%P")
# A custom representation
format_pin(x, "Borned %d of %B in %Y (a %A in week %U) with suffix no: %N")
# Extract only the year
format_pin(x, "%Y")
[Package sweidnumbr version 1.5.0 Index]