[R] Rounding

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Thu Sep 19 09:38:46 CEST 2002


Hi,

Suppose I have:
  459
  1789
  23590
and I'd like to round them to:
  400
  1700
  24000

On the other hand, say if I have:
  232
  1234
  23120
that need to be rounded to:
  300
  1300
  24000

I tried the round(), floor() or ceiling() and can't get what I want.  Is
there any tricks I can use to achieve this goal?

Cheers,

Kevin

------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list