title: removing elements in one vector from another in R
body: <p>I'm new to R and am having trouble finding a way to remove all of the elements of one vector from another.  I have a vector of dates called "dates", and want to remove the dates that are weekends (which are in the vector "weekends".</p>
  
  <p>The code below works, but I know there must be a more efficient way to do it rather than one at a time... Let me know!</p>
  
  <pre><code>  for (index in 1:length(weekends)) {
      datesReformatted &lt;- datesReformatted[datesReformatted != weekends[index]]
    }
  </code></pre>