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.
14 lines
433 B
R
14 lines
433 B
R
14 years ago
|
##################################################
|
||
|
############### Kelvin2Celsius ###################
|
||
|
##################################################
|
||
|
Kelvin2Celsius <- function(Kelvin) {
|
||
|
# Converts temperature from Kelvin to Celsius
|
||
|
#
|
||
|
# Check and correct for negative values
|
||
|
if (Kelvin < 0) {
|
||
|
# If Kelvin is less than zero, set it to zero
|
||
|
Kelvin <- 0
|
||
|
}
|
||
|
Celsius <- Kelvin - 273.15
|
||
|
return(Celsius)
|
||
|
}
|