R/sign.R

Defines functions sign

Documented in sign

sign <- function(x, zero=0){
  s <- (-1*(x<0)+zero*(x==0)+(x>0))
  s
}

Try the Ecfun package in your browser

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

Ecfun documentation built on May 2, 2019, 6:53 p.m.