title: replace special characters along with the space in list of strings
body: <p>I have character vector of strings like this : </p>
  
  <pre><code>x &lt;- c("weather is good_today","it. will rain tomorrow","do not* get_angry")
  </code></pre>
  
  <p>I want to replace all the special characters and space and replace them with "_".
  I used <code>str_replace all</code> from the <code>stringr package</code> like this : </p>
  
  <pre><code>x1 &lt;- str_replace_all(x,"[[:punct:]]","_")
  x2 &lt;- str_replace_all(x1,"\\s+","_")
  </code></pre>
  
  <p>But can this be done in one single command and I can get the output like this : </p>
  
  <pre><code>x
  [1]"weather_is_good_today"
  [2]"it_will_rain_tomorrow"
  [3]"do_not_get_angry"
  </code></pre>
  
  <p>Thanks for any help.</p>