fixWidth: fixed width numeric/integer to character conversion

Description Usage Arguments Value Author(s) Examples

View source: R/fixWidth.R

Description

this function is a wrapper around a sprintf call for numeric and integer values (I seem to be unable to memorise the sprintf call, hence the wrapper).

Usage

1
fixWidth(x, n = 1L)

Arguments

x

a numeric or integer vector

n

the width (nchar) of the resulting character

Value

A character vector of length x

Author(s)

Tim Appelhans

Examples

1
2
fixWidth(1, 2)
fixWidth(c(1, 20, 300, 4000, 50000), 5)

environmentalinformatics-marburg/Rsenal documentation built on Sept. 23, 2018, 5:17 a.m.