[R] round up a number to 10^4
dwinsemius at comcast.net
Tue Nov 1 20:42:10 CET 2011
On Nov 1, 2011, at 1:07 PM, Wendy wrote:
> Hi all,
> I have a list of numbers, e.g., X = c(60593.23, 71631.17, 75320.1),
> and want
> to round them so the output is Y = c(60000, 80000, 80000).
Under what notion of "rounding" would that be the result?
> I tried
> Y<-round(X,-4), but it gives me Y = c(60000, 70000, 80000). Do
> anybody know
> how to round up a number to 10^4?
> Thank you in advance.
David Winsemius, MD
West Hartford, CT
More information about the R-help