| setNsmall | R Documentation |
set the nsmall, i.e. number of decimal points, of a number, and convert it to character; 1000 separator ',' is added if max(abs(v)) > 999.
setNsmall(v, nSmall, keepInt)
v |
(numeric or integer vector) a number vector |
nSmall |
(integer) nsmall, i.e. number of decimal points, of a number (0 <= nsmall <= 20) |
keepInt |
(logical, F) if TRUE, don't format integers |
(character vector) formatted numbers in character
This is an internal function used in num2formattedStr
format, num2formattedStr
setNsmall(c(1.003,2.1),2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.