R/hello.R

Defines functions c_to_f f_to_c k_to_c

#' @description this function lets you convert


#' @examples
#' a <- c_to_f(0)
#' a
#' @export


# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
#   http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
#   Build and Reload Package:  'Cmd + Shift + B'
#   Check Package:             'Cmd + Shift + E'
#   Test Package:              'Cmd + Shift + T'

c_to_f <- function(temp_in_c) {
  (temp_in_c * 9 / 5) - 32
}

f_to_c <- function(temp_in_f) {
  (temp_in_f + 32) * 5/9
  }

k_to_c <- function(temp_in_k) {
  (temp_in_f + 273.15 + 32) * 5/9
}
s-rowland/convertr3 documentation built on May 14, 2019, 3:08 a.m.