title: R - Create categorical variable based on increase or decrease in continuous variable
body: <p>I'm trying to create a categorical variable from a continuous variable. I want to assign a 0 if the value decreased from the previous observation and a 1 if the variable increased from the previous observation. </p>
  
  <p>This is in R</p>