Message-ID: <29992AF2-412A-4E6A-8CA1-1107C01712FD@gmail.com>
Date: 2011-11-01T19:48:42Z
From: michael.weylandt at gmail.com (R. Michael Weylandt
Subject: round up a number to 10^4
In-Reply-To: <9E8C9CA0-22EE-4C0A-AB64-D83F839897FF@comcast.net>
Could you divide by your desired order of magnitude, use ceiling and then re-multiply?
Michael
On Nov 1, 2011, at 3:42 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
> 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
> Heritage Laboratories
> West Hartford, CT
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.