en: Print an en-dash

Description Usage Arguments Value Examples

View source: R/symbols.R

Description

Print an en-dash

Usage

1
en(from = "", to = "", format = NA, expand = F)

Arguments

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 from and to.

expand

Logical. Add spaces?

Value

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.

Examples

1
2
3
4
5
6
7
8
library(lubridate)
library(scales)
en()
en(today(), today() %m+% months(1))
en(today(), today() %m+% months(1), format = date_format("%B %e, %Y"))
en(1234, 5678)
en(1234, 5678, format = comma)
en(1234, 5678, format = comma, expand = TRUE)

BenjaminWolfe/typewritr documentation built on Nov. 23, 2019, 11:18 a.m.