powered by
Round elements of an onion
# S4 method for onion round(x,digits=0) # S4 method for onionmat round(x,digits=0)
Return an onion
Object of class onion
onion
number of digits to round to
Robin K. S. Hankin
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.
onionmat
round(rquat()*100) round(rquat()*100,3)
Run the code above in your browser using DataLab