[R] change default measurement unit to millimetre

e-letter inpost at gmail.com
Fri Aug 21 11:51:04 CEST 2009


On 20/08/2009, Patrick Connolly <p_connolly at slingshot.co.nz> wrote:
> On Thu, 20-Aug-2009 at 10:25PM +1000, Jim Lemon wrote:
>
>> e-letter wrote:
>>> Readers,
>>>
>>> How do I configure R so that all units of measurement are in
>>> millimetres? For example if I want to set the width of a graph, I want
>>> to write:
>>> width=100
>>> and R interprets this value as millimetres.
>>>
>>>
>> Hi e-letter,
>> If you just want a quick hack:
>>
>> mm2in<-function(mm) return(mm/25.4)
>>
>> then
>>
>> width=mm2in(100)
>
> As a dedicated lazy typist, I've discovered that this is less typing:
>
> width=100/25.4
>
Thanks, but really I want to change the entire R installation to
accept millimetre as the default unit of measurement.




More information about the R-help mailing list