title: R check if values in row are equal
body: <p>I have data in the following format:</p>
  <p><a href="https://i.stack.imgur.com/v8DZL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v8DZL.png" alt="image1" /></a></p>
  <p>what I want to do is check in each row whether the value in pred is = to the one in obs</p>
  <p>so in the example above 3 out of 5 are equal and the accuracy would be 60% ?</p>
  <p>How can I do that?</p>
  <p>Screenshot of code:</p>
  <p><a href="https://i.stack.imgur.com/lMPTz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lMPTz.png" alt="image2" /></a></p>