[R] Rounding to the nearest 5

Ottorino-Luca Pantani ottorino-luca.pantani at unifi.it
Mon Aug 17 12:39:26 CEST 2009

Steve Murray ha scritto:
> Dear all,
> A hopefully simple question: how do I round a series of values (held in an object) to the nearest 5? I've checked out trunc, round, floor and ceiling, but these appear to be more tailored towards rounding decimal places.
> Thanks,
> Steve
I had a similar problem in the past
Take a look at
and to the replies

Ottorino-Luca Pantani, Università di Firenze
Dip. Scienza del Suolo e Nutrizione della Pianta
P.zle Cascine 28 50144 Firenze Italia
Tel 39 055 3288 202 (348 lab) Fax 39 055 333 273 
OLPantani at unifi.it  http://www4.unifi.it/dssnp/

More information about the R-help mailing list