str_num: Rounding of Numbers, and convert to string

View source: R/str_format.R

str_numR Documentation

Rounding of Numbers, and convert to string

Description

Rounding of Numbers, and convert to string

Usage

str_num(x, digits = 2)

Arguments

x

a numeric vector. Or, for round and signif, a complex vector.

digits

integer indicating the number of decimal places (round) or significant digits (signif) to be used. For round, negative values are allowed (see ‘Details’).

Examples

format(round(2, 2)) # 2
str_num(2, 2) # 2.00

rpkgs/gg.layers documentation built on Sept. 14, 2024, 11:07 p.m.