Round: Rounding of onions

roundR Documentation

Rounding of onions

Description

Round elements of an onion

Usage

   ## 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.

Value

Return an onion

Author(s)

Robin K. S. Hankin

Examples


round(rquat()*100)
round(rquat()*100,3)

RobinHankin/onion documentation built on April 20, 2024, 2:05 p.m.