Round function

Rounding of onions

Rounding of onions

Round elements of an onion

## S4 method for signature 'onion' round(x,digits=0) ## S4 method for signature 'onionmat' round(x,digits=0)

Arguments

  • x: Object of class onion
  • digits: number of digits to round to

Details

For onions, coerce to a matrix, round, then coerce back to an onion. For onionmats, coerce to an onion, round, then coerce back to an onionmat.

Returns

Return an onion

Author(s)

Robin K. S. Hankin

Examples

round(rquat()*100) round(rquat()*100,3)
  • Maintainer: Robin K. S. Hankin
  • License: GPL-2
  • Last published: 2024-03-29