f_sign: Format Numeric Signs

Description Usage Arguments Value See Also Examples

View source: R/f_sign.R

Description

f_sign - Formats numeric values to just their sign ('-' == < 0, '+' == > 0, or ” == 0).

Usage

1
2
3
f_sign(x, positive = "+", negative = "-", zero = "", ...)

ff_sign(...)

Arguments

x

A vector of values.

positive

A string/value to insert in for positive values.

negative

A string/value to insert in for negative values.

zero

A string/value to insert in for zero values.

...

ignored.

Value

Returns a string of signs.

See Also

f_num

Examples

1
2
3
4
f_sign(c(-10, 0, 10))
f_sign(c(-10, 0, 10), zero = 0)
## web based
f_sign(c(-10, 0, 10), '<b>+</b>', '<b>&ndash;</b>')

numform documentation built on Oct. 10, 2021, 1:10 a.m.