RoundTo function

Round to Multiple

Round to Multiple

Returns a number rounded to the nearest specified multiple.

RoundTo(x, multiple = 1, FUN = round)

Arguments

  • x: is a vector of value in decibel (dB)
  • multiple: numeric. The multiple to which the number is to be rounded. Default is 1.
  • FUN: the rounding function as character or as expression. Can be one out of trunc, ceiling, round (default) or floor.

Returns

value or vector of values rounded

Examples

#data("P1FA") RoundTo(x = P1FA$LAeq, multiple = 0.5)[1:10]

Author(s)

Andri Signorell andri@signorell.net