cff | R Documentation |
This is a formatting function for consistent number reporting.
cff(num, low_ci, up_ci, dig = 0, method = c("num_only", "num_ci", "ci"))
num |
A numeric. The number to format. |
low_ci |
A numeric. Lower end of a confidence interval |
up_ci |
A numeric. Upper end of a confidence interval |
dig |
A numeric. Number of digits |
method |
What sort of printing do you need? (see Details) |
Set method
according to the printing you like: a unique number
with num_only
(default), the number and its confidence interval
with num_ci
, a ci
only (for example a range of time to onset)
The function properly returns NA
when input is missing.
A character vector with the formatted number(s)
num <- c(0.1, 0.02, 1.658)
cff(num)
cff(num, dig = 2)
cff(num = num[[1]],
low_ci = num[[2]],
up_ci = num[[3]],
method = "num_ci",
dig = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.