Learn R Programming

weathermetrics (version 1.2.2)

celsius.to.kelvin: Convert from Celsius to Kelvin.

Description

celsius.to.kelvin creates a numeric vector of temperatures in Kelvin from a numeric vector of temperatures in Celsius.

Usage

celsius.to.kelvin(T.celsius, round = 2)

Arguments

T.celsius
Numeric vector of temperatures in Celsius.
round
An integer indicating the number of decimal places to round the converted value.

Value

A numeric vector of temperature values in Kelvin.

See Also

kelvin.to.celsius

Examples

Run this code
# Convert from Celsius to Kelvin.
data(lyon)
lyon$TemperatureK <- celsius.to.kelvin(lyon$TemperatureC)
lyon

Run the code above in your browser using DataLab