Skip to contents

This is a combination of the base::signif() and base::formatC() functions, which appropriately rounds non-decimal digits, like signif() does, and appends trailing zeros as necessary, lik formatC() does.

Usage

.signifC(x, digits = 2)

Arguments

x

numerical vector, matrix, or array

digits

vector of positive integers: number of significant digits to be displayed

Value

A character vector, matrix, or array of the elements of x, appropriately rounded and truncated.