Learn R Programming

cocoon (version 0.2.0)

format_scientific: Format numbers in scientific notation

Description

Format numbers in scientific notation

Usage

format_scientific(x, digits = 1, type = "md")

Value

A character string of a number in scientific notation formatted in Markdown or LaTeX.

Arguments

x

Number.

digits

Number of digits after the decimal.

type

Type of formatting ("md" = markdown, "latex" = LaTeX).

Examples

Run this code
format_scientific(1111)
# Control number of digits after decimal with digits
format_scientific(1111, digits = 3)

Run the code above in your browser using DataLab