title: Add column to label U.S. states by their U.S. Census region
body: <p>I have data containing emailaddress and states, and I want to create a column labelling the region each state is in. In SQL, I've done this through case statements, but in R what's the best way? I'm defining regions by the US census (as of 2017). </p>
  
  <p>My starting data looks like this:</p>
  
  <pre><code>emailaddress     states
  xyz@gmail.com    NV      
  abc@hotmail.com  CA      
  bba@gmai.com     UT       
  so121@gamil.com  AZ       
  ad@yahoo.com     IA       
  </code></pre>
  
  <p>I want the result to be:</p>
  
  <pre><code>emails           states  regions
  xyz@gmail.com    NV      West
  abc@hotmail.com  CA      West
  bba@gmai.com     UT      West
  so121@gamil.com  AZ      West
  ad@yahoo.com     IA      Midwest
  </code></pre>
  
  <p>Then I want to write this output to a csv file.</p>
  
  <p>Any help or starting point is appreciated.</p>