number | R Documentation |
number
vectorThis creates a formatted double vector. You can specify the number of digits you want the value to display after the decimal, and the underlying value will not change. Additionally you can explicitly set whether scientific notation should be used and if numbers less than 0 should contain a leading 0.
number(x = numeric(), digits = 3L, scientific = FALSE, leading_zero = TRUE)
is_number(x)
as_number(x)
x |
|
digits |
The number of digits to display after the decimal point. |
scientific |
Whether the number should be represented with scientific notation (e.g. 1e2) |
leading_zero |
Whether a leading zero should be used on numbers less than 0 (e.g. .001) |
An S3 vector of class supernova_number
. It should behave like a double, but be
formatted consistently.
number(1:5, digits = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.