[R] "rounding" to a number that is LOWER than my number

Dimitri Liakhovitski dimitri.liakhovitski at gmail.com
Fri Sep 16 19:15:03 CEST 2011


Thanks a lot, guys - very helpful!

On Fri, Sep 16, 2011 at 12:52 PM, Bert Gunter <gunter.berton at gene.com> wrote:
> This is easy to do (e.g. divide by the appropriate power of 10, use floor,
> multiply the power of 10), but you are going about it in the wrong way.
>
> See the "xaxs"  component of the ?par  argument list for the right way.
>
> -- Bert
>
> On Fri, Sep 16, 2011 at 9:28 AM, Dimitri Liakhovitski
> <dimitri.liakhovitski at gmail.com> wrote:
>>
>> Hello!
>>
>> What function would allow me to "round" down, rather than up?
>> For example, x<-1.98
>> I'd like to get 1.9 - rather than 2.0.
>>
>> Reason - I am creating a minimum for an axis for a plot, and I need it
>> to be lower than x (which, in turn, is the lowest number already).
>> Thank you!
>>
>> --
>> Dimitri Liakhovitski
>> marketfusionanalytics.com
>>
>> ______________________________________________
>> 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.
>
>
>
> --
> "Men by nature long to get on to the ultimate truths, and will often be
> impatient with elementary studies or fight shy of them. If it were possible
> to reach the ultimate truths without the elementary studies usually prefixed
> to them, these would not be preparatory studies but superfluous diversions."
>
> -- Maimonides (1135-1204)
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
>
>



-- 
Dimitri Liakhovitski
marketfusionanalytics.com



More information about the R-help mailing list