ish.RdPrint a plus/minus character.
ish(margin = "", x = "", format = NA, margin_format = format, parentheses = FALSE, contract = FALSE)
| margin | The number after the plus/minus. Can be a character. |
|---|---|
| x | The number, if any, before the plus/minus. Can be a character. |
| format | Function. If provided, formats |
| margin_format | Function. If provided, formats |
| parentheses | Logical. Should |
| contract | Logical. If |
Character. x plus or minus a margin (UTF-8).
ish uses glue,
so you can use curly bracket notation in x and margin,
just like with glue.
#> [1] "±"ish("5%")#> ±5%#> ±5%#> 100 (±5%)ish( x = 1e3, margin = .05, format = comma, margin_format = percent_format(accuracy = 1), parentheses = TRUE )#> 1,000 (±5%)ish(x = 5, margin = 5)#> 5 ± 5ish(x = 5, margin = 5, contract = TRUE)#> 5±5