View source: R/stata_related.R
stformat | R Documentation |
format number in a reasonable way.
stformat(
x,
digits = 3L,
nsmall = 3L,
width = NULL,
big.mark = ",",
na.replace = ""
)
x, |
numeric vector |
digits, |
how many significant digits are to be used for
numeric and complex |
nsmall, |
the minimum number of digits to the right of the decimal point in formatting real/complex numbers in non-scientific formats. |
na.replace, |
used to replace |
width: |
|
stformat(10 ^ seq(-10, 10) + runif(21))
stformat(10 ^ seq(-10, 10) + runif(21), nsmall = 2)
stformat(10 ^ seq(-10, 10) + runif(21), digits = 4)
stformat(10 ^ seq(-10, 10) + runif(21), width = 7)
stformat(10 ^ seq(-10, 10) + runif(21), width = 11)
stformat(c(NA, 10 ^ seq(-5, 5)) + runif(12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.