R/r-utility-ustep.R

Defines functions ustep

Documented in ustep

## unit step function
ustep <- function(v, thres=0) { as.numeric(v>=thres) }


if (FALSE)
{

  # usage examples
ustep(seq(-1,1,0.25))
ustep(seq(-1,1,0.25), 0.5)

}
42n4/dmr.util documentation built on May 20, 2019, 2:02 p.m.