title: Values less than threshold = 0 more than threshold =1 using r
body: <p>I have a column with values between 0 and 1 and I want to use a threshold, say 0.7. If a value is less than 0.7 I want it to change to 0 and more than 0.7 change to 1.</p>
  
  <p>I need to do this to measure my prediction accuracy since the actual responses are in 0 &amp; 1 format.</p>
  
  <p>How can I do this?</p>