Description Usage Arguments Details Value Examples
View source: R/webexercises_fns.R
Round up from .5
1 | round2(x, digits = 0)
|
x |
A vector of numeric values. |
digits |
Integer indicating the number of decimal places ('round') or significant digits ('signif') to be used. |
Implements rounding using the "round up from .5" rule,
which is more conventional than the "round to even" rule
implemented by R's built-in round
function. This
implementation was taken from
https://stackoverflow.com/a/12688836.
A vector of rounded numeric values.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.