Unit conversions: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(links added)
Line 22: Line 22:


{{attack|# |Explanations. Do these make sense?|--[[User:Jouni|Jouni]] 11:43, 1 June 2012 (EEST)}}{{defend|# |Yes.|--[[User:Marjo|Marjo]] 14:39, 1 June 2012 (EEST)}}
{{attack|# |Explanations. Do these make sense?|--[[User:Jouni|Jouni]] 11:43, 1 June 2012 (EEST)}}{{defend|# |Yes.|--[[User:Marjo|Marjo]] 14:39, 1 June 2012 (EEST)}}
==Rationale==
==See also==
* [http://www.chnosz.net/html/util.units.html An R package for converting units]
==References==
<references/>
==Related files==
{{mfiles}}

Revision as of 20:13, 2 June 2012



The code related to this tool is now a part of Opasnet (R library).

Question

How to convert data from one unit to another in R?

Answer

We need conversion factors, which are listed below, and a code that does the actual conversion.

Unit conversions: Difference between revisions(-)
ObsFromToResultDescription
1MWhMJ36001 MWh = 1 MWh * 3600 s/h = 3600 MWs = 3600 MJ
2toeMJ350001 toe = 1000 kgoe = 1000 kg * 35 MJ/kg = 35000 MJ
3mg/MWhmg/MJ0.000277777777781/3600
4kg/MWhkg/GJ0.277777777781/3.6
5kg/MWhtn/TJ0.277777777780.001 tn/kg / 0.0036 TJ/kWh
6kg/MWhtn/MJ0.000000277777777780.001 tn/kg / 3600 MJ/MWh

⇤--#: . Explanations. Do these make sense? --Jouni 11:43, 1 June 2012 (EEST) (type: truth; paradigms: science: attack)←--#: . Yes. --Marjo 14:39, 1 June 2012 (EEST) (type: truth; paradigms: science: defence)

Rationale

See also

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>