format_scientific {cocoon} | R Documentation |
Format numbers in scientific notation
format_scientific(x, digits = 1, type = "md")
x |
Number |
digits |
Number of digits after the decimal |
type |
Type of formatting ("md" = markdown, "latex" = LaTeX) |
A character string of a number in scientific notation formatted in Markdown or LaTeX.
format_scientific(1111)
# Control number of digits after decimal with digits
format_scientific(1111, digits = 3)