Print a multiplication symbol

times(multiplier = "", multiplicand = "", format = NA,
  contract = F)

Arguments

multiplier

Character. If the multiplication symbol separates two strings, the first one.

multiplicand

Character. If the multiplication symbol separates two strings, the second one.

format

Function. If provided, formats multiplier and multiplicand.

contract

Logical. Remove spaces?

Value

Character. The multiplier and multiplicand (if provided), formatted if necessary, separated by a multiplication symbol (UTF-8).

times is a wrapper for glue, so you can use curly bracket notation in multiplier and multiplicand, just like with glue.

Examples

library(scales) times()
#> [1] "×"
times(1234, 5678)
#> 1234 × 5678
times(1234, 5678, format = comma)
#> 1,234 × 5,678
times(1234, 5678, format = comma, contract = TRUE)
#> 1,234×5,678