AProunder: AP Rounder

Description Usage Arguments Value

View source: R/AProunder.R

Description

Provides extra options for rounding numbers, such as rounding a value to uneven intervals and setting those intervals to 'snap' or pass through a defined origin value. Can also be used on Extent objects from the raster package.

Usage

1
AProunder(value, interval, direction = "closest", snap = 0)

Arguments

value

numeric or Extent object. Input value

interval

numeric. The interval to which the input value should be rounded

direction

character. The rounding direction. Can be 'closest', 'up' or 'down' for numeric value arguments or 'closest', 'in' or 'out' for Extent objects.

snap

numeric. An origin value through which the interval with pass through. Default is 0.

Value

Rounded number or Extent object


AndyPL22/APfun documentation built on Dec. 16, 2021, 9:56 p.m.