Learn R Programming

lares (version 4.4)

formatNum: Nicely Format Numerical Values

Description

This function lets the user format numerical values nicely

Usage

formatNum(x, decimals = 2, type = 1, scientific = FALSE)

Arguments

x

Numerical Vector

decimals

Integer. Amount of decimals to display

type

Integer. 1 for International standards. 2 for American Standards.

scientific

Boolean. Scientific notation