Learn R Programming

wrMisc (version 1.2.3)

equLenNumber: Equal character-length number

Description

equLenNumber convert numeric entry 'x' to text, with all elements getting the same number of characters (ie by adding preceeding or tailing 0s, if needed). So far, the function cannot handle scientific annotations.

Usage

equLenNumber(x, silent = FALSE, callFrom = NULL)

Arguments

x

(caracter) input vector

silent

(logical) suppress messages

callFrom

(character) allows easier tracking of message(s) produced

Value

character vector formated as equal number of characters per value

See Also

sprintf

Examples

Run this code
# NOT RUN {
equLenNumber(c(12,-3,321))
equLenNumber(c(12,-3.3,321))
# }

Run the code above in your browser using DataLab