Skip to content
Prev 273796 / 398506 Next

round() and negative digits

Just wondering here -- I tested and found to my delight that

%  round(325.4,-2)
[1] 300

gave me exactly what I would have expected (and wanted).  Since it's not 
explicitly mentioned in the documentation that negative 'digits' is 
allowed, I just wanted to ask whether this behavior is intentional or a 
happy turn of events.  I'm always paranoid that something not explicitly 
documented might disappear in future revisons.

thanks
Carl