thequerist thequerist - 7 months ago 57
R Question

Converting units in R

I would like to convert from imperial units to metric and vice versa in R. How do I go about doing that?

If there is no current way of doing that, how can I create a package that would?


I know this is very late, but the package measurements has a function conv_unit() that may be what you're looking for. You enter the imperial value you have, what unit you're converting from (e.g. 'ft') and what you want to convert to (e.g. 'km'). It has a variety of different dimensions (not just length).