title: R vector for mainland US states
body: <p>I wrote a vector for all the mainland US states when creating maps, so that nobody has to do this manually again. This is important for packages like Tigris if one is only trying to map mainland US. Please see below. Is there a more efficient way to do this?</p>
  <pre><code>library(tigris)
  
  allstates &lt;- states(cb = TRUE) #this loads tigris 
  
  allstates &lt;- allstates %&gt;% filter(
  NAME == &quot;Alabama&quot; |NAME == &quot;Arizona&quot; |NAME == &quot;Arkansas&quot; | 
  NAME == &quot;California&quot; | NAME == &quot;Colorado&quot; | NAME == &quot;Connecticut&quot; |NAME == &quot;Delaware&quot; |
  NAME == &quot;Florida&quot; | NAME ==&quot;Georgia&quot; |  NAME ==&quot;Idaho&quot; |
  NAME ==&quot;Illinois&quot; |NAME ==&quot;Indiana&quot; |NAME ==&quot;Iowa&quot; |NAME ==&quot;Kansas&quot; |
  NAME ==&quot;Kentucky&quot; |NAME ==&quot;Louisiana&quot; |NAME ==&quot;Maine&quot; |NAME ==&quot;Maryland&quot; |
  NAME ==&quot;Massachusetts&quot; |NAME ==&quot;Michigan&quot; |NAME ==&quot;Minnesota&quot; |NAME ==&quot;Mississippi&quot; |
  NAME ==&quot;Missouri&quot; |NAME ==&quot;Montana&quot; |NAME ==&quot;Nebraska&quot; |NAME ==&quot;Nevada&quot; |
  NAME ==&quot;New Hampshire&quot; |NAME ==&quot;New Jersey&quot; |NAME ==&quot;New Mexico&quot; |NAME ==&quot;New York&quot; |
  NAME ==&quot;North Carolina&quot; |NAME ==&quot;North Dakota&quot; |NAME ==&quot;Ohio&quot; |NAME ==&quot;Oklahoma&quot; |
  NAME ==&quot;Oregon&quot; |NAME ==&quot;Pennsylvania&quot; |NAME ==&quot;Rhode Island&quot; |NAME ==&quot;South Carolina&quot; |
  NAME ==&quot;South Dakota&quot; |NAME ==&quot;Tennessee&quot; |NAME ==&quot;Texas&quot; |NAME ==&quot;Utah&quot; |NAME ==&quot;Vermont&quot; |
  NAME ==&quot;Virginia&quot; | NAME ==&quot;Washington&quot; | NAME ==&quot;West Virginia&quot; | NAME ==&quot;Wisconsin&quot; | 
  NAME ==&quot;Wyoming&quot; )```
  </code></pre>