Convert-units: Helper functions for common unit conversions

Convert-unitsR Documentation

Helper functions for common unit conversions

Description

These functions are named to make it intuitive to switch between scales, with pairs existing for different directions of conversion.

Usage

micro_to_full(data)

full_to_micro(data)

micro_to_milli(data)

milli_to_micro(data)

milli_to_full(data)

full_to_milli(data)

l_to_m3(data)

m3_to_l(data)

sec_to_day(data)

day_to_sec(data)

shortwave_to_einstein(data)

Arguments

data

A numeric vector.

Details

Though some of these functions do the same thing numerically, having multiple names which match the desired conversion should reduce friction when developing code. This should also help avoid typos when it comes to 0s, and also stop you needing to constantly look up conversion factors!

The 'shortwave_to_einsteins' function is not exact and is based on a couple of assumptions to get from watts to einsteins per m^2 per day. It expects an input of total Watts per day per m^2.

  • The proportion of PAR from shortwave downward radiation is 0.43.

  • The energy content of a mole of photons is 217.503 kJ, taken from midband radiation (550nm).

Value

A numeric vector following unit conversion.


Jack-H-Laverick/MiMeMo.tools documentation built on March 6, 2023, 3:44 p.m.