title: For loop over list of items to use in R's gsub
body: <p>In R, I want to loop over items to replace in a column.</p>
  
  <p>the input into the function is a list of items and I want to return the list after removing any and all items within itemsToBeRemoved list.</p>
  
  <pre><code>removePunctuation &lt;- function(punctuationObject){
      itemsToBeRemoved &lt;- list(".", ",", ";", ":", "'", "!", "#", "-", "--")
      objectApplyTo &lt;- punctuationObject
      for (itemToReplace in itemsToBeRemoved){
          resultObject &lt;- gsub("itemToReplace", "", objectApplyTo, fixed=TRUE)
          return(resultObject)   
      }
  }
  </code></pre>
  
  <p>I expect all instances of ".", ",", ";", ":", "'", "!", "#", "-", "--" to be removed from a list of character elements.</p>