R/delta.R

Defines functions delta

Documented in delta

#' delta
#'
#' the delta function
#'
#'
#' @name delta
#' @param a A number.
#' @param b A number.
#' @return The function delta(\code{a},\code{b}), if \code{a} == \code{b}, return 1; else, return 0.


delta <- function (a, b)
{
  if (a == b) {result = 1}
  else {result = 0}
  result
}

Try the SmartSifter package in your browser

Any scripts or data that you put into this service are public.

SmartSifter documentation built on May 29, 2017, 9:12 p.m.