## 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.