format_scientific {cocoon}R Documentation

Format numbers in scientific notation

Description

Format numbers in scientific notation

Usage

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

Arguments

x

Number

digits

Number of digits after the decimal

type

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

Value

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

Examples

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

[Package cocoon version 0.1.0 Index]