Unit conversions

From Opasnet
Jump to navigation Jump to search



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(-)
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)