Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Temperature-conversion/R/temperature-conversion.r
Normal file
14
Task/Temperature-conversion/R/temperature-conversion.r
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
convert_Kelvin <- function(K){
|
||||
if (!is.numeric(K))
|
||||
stop("\n Input has to be numeric")
|
||||
|
||||
return(list(
|
||||
Kelvin = K,
|
||||
Celsius = K - 273.15,
|
||||
Fahreneit = K * 1.8 - 459.67,
|
||||
Rankine = K * 1.8
|
||||
))
|
||||
|
||||
}
|
||||
|
||||
convert_Kelvin(21)
|
||||
Loading…
Add table
Add a link
Reference in a new issue