View source: R/other_functions.R
truncN | R Documentation |
This set of functions truncates the numbers without rounding. Each function truncates the given number to the decimal points specified in the function itself.
This function truncates the numbers without rounding. Function truncates the given number to the decimal points specified in argument digits. Note that rounding is performed with 1 extra digits to correctly truncate the values as much as possible.
trunc0(x)
trunc1(x)
trunc2(x)
trunc3(x)
trunc4(x)
truncN(x, digits)
x |
numeric. A numeric vector. |
digits |
numeric. Truncating digits. |
Numeric value or vector.
Numeric value or vector.
trunc0(2.67896)
trunc1(2.67896)
trunc2(2.67896)
trunc3(2.67896)
trunc4(2.67896)
truncN(2.67896, digits = 0)
truncN(2.67896, digits = 1)
truncN(2.67896, digits = 2)
truncN(2.67896, digits = 3)
truncN(2.67896, digits = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.