R/math.R

Defines functions add subtract

Documented in add subtract

#' Sum two numbers.
#'
#' @param x A number.
#' @param y A number.
#'
#' @return The sum of x and y.
#'
#' @examples
#' add(1, 2)
#' add(-5, 7)
add <- function(x, y) {
  x + y
}

#' Subtract the second number from the first.
#'
#' @param x A number.
#' @param y A number.
#'
#' @return The result of \code{x - y}
#'
#' @examples
#' subtract(2, 1)
#' subtract(70, 80)
subtract <- function(x, y) {
  x - y
}
arauner2/CIforR documentation built on Nov. 3, 2019, 1:55 p.m.