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 Oct. 10, 2022, 1:06 a.m.