round_up: Round Up

Description Usage Arguments Value Examples

View source: R/round_up.R

Description

Round a number up to the number place second to the left. This is useful for reports that need rounded minimums and maximums.

Usage

1
round_up(x, format = "normal")

Arguments

x

A numeric value.

format

A boolean. Takes three different options to round up and stylize:

  • normal: The default, return the number with no formatting.

  • dollar: Return the number with a leading dollar sign along with commas.

  • comma: Return the number with commas.

Value

A numeric, or a string if format is not "normal".

Examples

1
2
3
4
5
6
7
## Not run: 
# Round a number up
round_up(123456)
# Number with only 2 numeric places:
round_up(19, format = "dollar")

## End(Not run)

KoderKow/kowr documentation built on July 19, 2021, 4:18 p.m.