round_opt: INTERNAL: Rounding function

View source: R/round_opt.R

round_optR Documentation

INTERNAL: Rounding function

Description

INTERNAL: Rounding function

Usage

round_opt(x, round_fun, is_this_for_Word = FALSE, out_class = "numeric")

Arguments

x

vector to be rounded

round_fun

which function to use to round. Options: "round", "signif", "consultancy", "none".

is_this_for_Word

TRUE or FALSE for whether this is being applied to a Word file in this situation

out_class

data class of the ouput; defaults to "numeric" but "character" is acceptable and will often work better if this is for a Word file or is being supplied to formatTable_Simcyp. NB: If you chose a rounding option of "Consultancy", this will return character data no matter what.

Value

rounded numbers that might, after running this, be character data

Examples

# None.


shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.