formatZeros: formatZeros: replace blanks with 0's in printed numbers

View source: R/formatZeros.R

formatZerosR Documentation

formatZeros: replace blanks with 0's in printed numbers

Description

Format input vector, replacing leading or trailing blanks with zeros.

Usage

formatZeros(x, width = 2, format = "d", ...)

Arguments

x
  • object that can be coerced to a numeric vector using as.numeric(as.vector(x))

width
  • width of formatted numbers

format
  • c-type format string (see "format" description in base R)

...
  • additional inputs to "format"

Details

None.

Value

character vector with blanks replaced by zeros


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.