fv_num_percent {numform} | R Documentation |
Convert a Numeric Vector to Number and Parenthetical Percentages
Description
Convert a vector of numbers into a vector of strings with the number followed by the relative percentage in parenthesis.
Usage
fv_num_percent(
x,
x_digits = getOption("numformdigits"),
y_digits = x_digits,
sep = "",
comma = TRUE,
...
)
ffv_num_percent(...)
Arguments
x |
A numeric vector. |
x_digits |
The number of digits to round the x vector. |
y_digits |
The number of digits to round the y vector. |
sep |
The separator between the first number and the leading parenthesis. |
comma |
logical. If |
... |
ignored. |
Value
Returns a vector of parenthesis combined strings using vector x followed by the value as a relative percent in parenthesis.
Examples
fv_num_percent(1:10)
fv_num_percent(1:10, x_digits = 0, y_digits = 1, sep = " ")
[Package numform version 0.7.0 Index]