title: How to filter rows where there are changes in a categorical variable
body: <p>We have a dataframe called <code>data</code> with 2 columns: <code>Time</code> which is arranged in ascending order, and <code>Place</code> which describes where the individual was:</p>
  <pre><code>data.frame(Time = seq(1,20,1),
             Place = rep(letters[c(1:3,1)], c(5,5,3,7)))
  </code></pre>
  <p>Since this data is in ascending order with respect to <code>Time</code>, we want to subset the rows where <code>Place</code> changes from the previous observation.</p>
  <p>The resulting dataframe for this data would look like this:</p>
  <pre><code>Time  Place
  1      a
  6      b
  11     c
  14     a
  </code></pre>
  <p>Notice that the same <code>Place</code> can show up later, like <code>Place == a</code> did in this example. How can we perform this kind of subset in R?</p>