953 240102</span></span>
<span><span class="co">#&gt; 531418: MCID3112870009  19954 240102</span></span>
<span><span class="co">#&gt; 531419: MCID3112870009  19983 240102</span></span></code></pre></div>
<p><em>Filter.</em>   Order rows by ID and term, then filter to retain
the start term observation. If your data contain students enrolled in
more than one major in their first term, replace <code>.SD[1]</code>
with the (slower) <code>.SD[which.min(term)]</code>.</p>
<div class="sourceCode" id="cb7"><pre cl