title: Indicator function in R
body: <p>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 element in a vector is less than 0. </p>
  
  <p>I need to use this function on all elements in a vector returning a new vector with only zeros and ones.</p>
  
  <p>Thanks.</p>