pad_decimals

0th

Percentile

Pad decimal places with trailing zeros.

Pad decimal places with trailing zeros.

Usage
pad_decimals(numbers, digits = NULL)
Arguments
numbers

A number or vector of numbers.

digits

Number of decimal places to pad. If NULL (default), uses the maximum number of decimal places in the numbers input. If digits is less than the number of decimal places in the data, rounds the data to the decimal place specified. If rounding at a 5, follows R's rules to round to the nearest even number.

Value

The original numbers but with trailing zeros added to the decimal places.

Aliases
  • pad_decimals
Examples
# NOT RUN {
pad_decimals(c(2, 3.4, 8.808))
# }
Documentation reproduced from package crimeutils, version 0.1.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.