[R] Physical Units in Calculations

Robert A LaBudde ral at lcfltd.com
Mon Apr 13 04:20:13 CEST 2009


At 08:00 PM 4/12/2009, Tom La Bone wrote:

>Back in 2005 I had been doing most of my work in Mathcad for over 10 years.
>For a number of reasons I decided to switch over to R. After much effort and
>help from you folks I am finally "thinking" in R rather than thinking in
>Mathcad and trying to translating to R. Anyway, the only task I still use
>Mathcad for is calculations that involve physical quantities and units. For
>example, in Mathcad I can add 1 kilometer to 1 mile and get the right answer
>in the units of length I choose. Likewise, if I try to add 1 kilometer to 1
>kilogram I get properly chastised. Is there a way in R to assign quantities
>and units to numbers and have R keep track of them like Mathcad does?

Yes, but it's a lot of work: Create objects with units as an attribute.

Perhaps someone else can tell you if such a set of definitions already exists.

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ral at lcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"




More information about the R-help mailing list