R/new_abs.R

Defines functions new_abs

Documented in new_abs

#' Absolute Value
#'
#' This function allows you to take the absolute value of two numbers.
#' @param a a numeric or numerical vector
#' @param b a numeric or numerical vector
#' @keywords goofy
#' @export
#' @examples to find the distance between a and b, call new_abs(a, b)
#' new_abs()


new_abs <- function(a, b){
  ifelse(a - b > 0, a-b, b-a)
}
simonpcouch/goofy-package documentation built on Feb. 19, 2018, 12:03 a.m.