 time with the first name &quot;Dwight&quot; 
#and one time with the first name &quot;Dwight D&quot;. 
#Note: We delete the observation with the extra &quot;D&quot; as the other presidents do 
#not have their middle names included
pd &lt;- pd[pd$firstName != &quot;Dwight D&quot;,]

#We fix the following mistake: 
#Lincoln has had his date of death recorded as 1801-04-15 rather than the actual
#date 1865-04-15.
pd[pd$lastName == &quot;Lincoln&quot;, &quot;dateOfDeath&quot;] &lt;- as.Date(&quot;1865-04-15&quo