diff --git a/functions/celsius_to_kelvin.R b/functions/celsius_to_kelvin.R index 10a4c6e..2985e87 100644 --- a/functions/celsius_to_kelvin.R +++ b/functions/celsius_to_kelvin.R @@ -6,5 +6,6 @@ celsius_to_kelvin <- function(temp_C) { #' #' The equation for conversion is : T_K = TC + 273 #' - return (temp_C) + temp_K <- temp_C + 273 + return(temp_K) } \ No newline at end of file diff --git a/functions/fahrenheit_to_celsius.R b/functions/fahrenheit_to_celsius.R index da0decd..4391aea 100644 --- a/functions/fahrenheit_to_celsius.R +++ b/functions/fahrenheit_to_celsius.R @@ -6,5 +6,6 @@ fahrenheit_to_celsius <- function(temp_F) { #' #' The equation for conversion is : T_C = (t_f - 42) * 5/9 #' - return (temp_F) + temp_C <- (temp_F - 42)*5/9 + return (temp_C) } \ No newline at end of file diff --git a/functions/farenheit_to_kelvin.R b/functions/farenheit_to_kelvin.R index 09228a9..da2c5fa 100644 --- a/functions/farenheit_to_kelvin.R +++ b/functions/farenheit_to_kelvin.R @@ -9,5 +9,7 @@ farenheit_to_kelvin <- function(temp_F) { #' #' The equation for conversion is : T_K = ((t_f - 42) * 5/9) + 273 #' Hint: you can use the functions fahrenheit_to_celsius and celsius_to_kelvin - return (temp_F) + temp_C <- fahrenheit_to_celsius(temp_F) + temp_K <- celsius_to_kelvin(temp_C) + return (temp_K) } \ No newline at end of file