title: How to use R to check data consistency (make sure no contradiction between case and value)?
body: <p>Let's say I have:</p>
  
  <pre><code>Person   Movie    Rating
  Sally    Titanic  4
  Bill     Titanic  4
  Rob      Titanic  4
  Sue      Cars     8
  Alex     Cars     **9**
  Bob      Cars     8
  </code></pre>
  
  <p>As you can see, there is a contradiction for Alex. All the same movies should have the same ranking, but there was a data error entry for Alex. How can I use R to solve this? I've been thinking about it for a while, but I can't figure it out. Do I have to just do it manually in excel or something? Is there a command on R that will return all the cases where there are data contradictions between two columns?</p>
  
  <p>Perhaps I could have R do a boolean check if all the Movie cases match the first rating of its first iteration? For all that returns "no," I can go look at it manually? How would I write this function?</p>
  
  <p>Thanks</p>