title: Remove everything from string but spaces, dashes and letters in R?
body: <p>I am trying to remove everything in a string except spaces dashes(-) and letters.
  For example</p>
  
  <p><code>string1 &lt;- "test-%432string *#$ one!~+"</code></p>
  
  <p>how do I return "test-string one"</p>
  
  <p>I tried :
  <code>gsub("[^a-zA-Z-\s]", "", string1)</code>
  to no avail -- it removes the space, which should be left.</p>
  
  <p>Thanks for any help.</p>