R/foobar.R

Defines functions foobar foobar.numeric foobar.character

Documented in foobar foobar.character foobar.numeric

#' Foo bar generic
#'
#' @param x Object to foo.
#' @export
foobar <- function(x) UseMethod("foobar")

#' @describeIn foobar Difference between the mean and the median
#' @export
foobar.numeric <- function(x) abs(mean(x) - median(x))

#' @describeIn foobar First and last values pasted together in a string.
#' @export
foobar.character <- function(x) paste0(x[1], "-", x[length(x)])
hf2004418/outdepreg documentation built on May 21, 2019, 1:45 a.m.