R/add.R

Defines functions add subtract

Documented in add subtract

#' 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 Returns the sum of x and y 
#' 
#' @examples 
#' ### First you can add small numbers
#' add(1,1)
#' 
#' ### Now you can add big numbers
#' add(222232, 2234234233)
#' 
#' @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 from which we want to subtract
#' @param y This is the value we will subtract
#' 
#' @return Returns the difference of x and y 
#' 
#' @examples 
#' ### First you can subtract small numbers
#' subtract(1,1)
#' 
#' ### Now you subtract add big numbers
#' subtract(222232, 2234234233)
#' 
#' @export

subtract <- function(x, y){x-y} 
wevanjohnson/mypackage documentation built on May 25, 2019, 12:44 a.m.