celsius.to.kelvin {weathermetrics} | R Documentation |
celsius.to.kelvin
creates a numeric vector of temperatures in
Kelvin from a numeric vector of temperatures in Celsius.
celsius.to.kelvin(T.celsius, round = 2)
T.celsius |
Numeric vector of temperatures in Celsius. |
round |
An integer indicating the number of decimal places to round the converted value. |
A numeric vector of temperature values in Kelvin.
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
# Convert from Celsius to Kelvin.
data(lyon)
lyon$TemperatureK <- celsius.to.kelvin(lyon$TemperatureC)
lyon