en.Rd
Print an en-dash
en(from = "", to = "", format = NA, expand = F)
from | Character. If the en-dash separates two strings, the first one. |
---|---|
to | Character. If the en-dash separates two strings, the second one. |
format | Function. If provided, formats |
expand | Logical. Add spaces? |
Character. The from and to strings, separated by an en-dash (UTF-8).
en
is a wrapper for glue
,
so you can use curly bracket notation in from
and to
,
just like with glue
.
library(lubridate)#> #>#>#> #>#> –#> 2019-09-30–2019-10-30#> September 30, 2019–October 30, 2019en(1234, 5678)#> 1234–5678en(1234, 5678, format = comma)#> 1,234–5,678en(1234, 5678, format = comma, expand = TRUE)#> 1,234 – 5,678