I\'m looking for an indicator function in R, i.e. a function that returns a 1, if the value of an element in a vector is greater than 0 and returns zero, if the value of an
There is also an built-in indicator function in R
Indicator(x,min,max)
-Inf and Inf are still the valid values.