You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
471 B
R
15 lines
471 B
R
13 years ago
|
##################################################
|
||
|
############### Celsius2Kelvin ###################
|
||
|
##################################################
|
||
|
Celsius2Kelvin <- function(Celsius) {
|
||
|
# Converts temperature from Celsius to Kelvin
|
||
|
#
|
||
|
# Check and correct for values below -273.15
|
||
|
if (Celsius < -273.15) {
|
||
|
# If Celsis is less than absolute zero, set it to absolute zero
|
||
|
Celsius <- -273.15
|
||
|
}
|
||
|
Kelvin <- Celsius + 273.15
|
||
|
return(Kelvin)
|
||
13 years ago
|
}
|