Learn R Programming

plotcli (version 0.2.0)

format_four_chars: Format number to four characters

Description

This function formats a number to a string of exactly four characters.

Usage

format_four_chars(num)

Value

A string representation of the number with exactly four characters.

Arguments

num

The number to be formatted.

Examples

Run this code
format_four_chars(123)
format_four_chars(-12.34)

Run the code above in your browser using DataLab