Given a single numeric vector or factor, will compute no. equal to a .referent value and percent of total, returning results in string. Mostly called by other functions.
num_fctr(x, .digits=2, .referent = TRUE)
x | A numeric or factor class vector |
---|---|
.digits | Significant figures to round to |
.referent | Value to compute no. (percent) for |
A character string of length 1, 'No. (percent)'
#> [1] "11 (34.4%)"