modelsummary (version 0.1.0)

rounding: Convert numeric values to strings using the `sprintf` function. NA, NaN, -Inf, and Inf are replaced by an empty string.

Description

Convert numeric values to strings using the `sprintf` function. NA, NaN, -Inf, and Inf are replaced by an empty string.

Usage

rounding(x, fmt = "%.3f")

Arguments

x

a numeric vector to be converted to string

fmt

a character vector of format strings which will be fed to the `sprintf` function. See ?sprintf for details.

Value

a rounded number as character