[ top | up ]

Encode in a Common Format

Syntax

format(x, trim=FALSE)

Value

This function converts its first argument to a vector of character strings, which have a common format (as is done by print). If trim is TRUE, leading blanks are trimmed off the strings. This is useful when the strings are to be used for plot axis annotation.

The function formatC provides a rather more flexible formatting facility.

See Also

formatC.

Examples

format(1:10)