R/add.R

Defines functions add subtract

Documented in add subtract

#' This is my addition function
#' 
#' This function generates and returns the sum of x and y.
#' @param x This is the first value to add.
#' @param y This is the second value to add.
#' 
#' @return This function returns the sum of x and y.
#' 
#' @examples 
#' ### First, you can add small numbers. 
#' add(1,1)
#' 
#' ### You can also add big numbers.
#' add(500, 4093)
#' @export

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


#' Subtraction Function
#' 
#' This function generates and returns the difference of x and y.
#' @param x This is the value from which we want to subtract.
#' @param y This is the value we will subtract.
#' 
#' @return This function returns the difference of x and y.
#' 
#' @examples 
#' ### First, you can subtract small numbers. 
#' subtract(1,1)
#' 
#' ### You can also subtract big numbers.
#' subtract(500, 4093)
#' @export

subtract <- function(x, y) x-y
Aubreyodom/mypackage documentation built on May 29, 2019, midnight