R/math_functions.R

Defines functions divide multiply subtract add

Documented in add divide multiply subtract

#' Basic mathematical functions
#'
#' @param x Numeric value
#' 
#' @param y Numeric value
#'
#' @return Numeric of length 1
#' 
#' @author Shona Wilde
#' 
#' @export

add <- function(x, y) {
  
  x + y
  
}

#' @rdname add
#' @export
subtract <- function(x, y) {
  
  x - y
  
}


#' @rdname add
#' @export
multiply <- function(x, y) {
  
  x * y
  
}

#' @rdname add
#' @export
divide <- function(x, y) {
  
  x / y
  
}
shonawilde/shonarrr documentation built on Jan. 29, 2025, 1:27 a.m.