title: I want to grep/gsub empty, space and a hyphen and replace that with NA in R
body: <p>I have the following data,</p>
  
  <pre><code>a &lt;- c('a','1','',' ','-')
  </code></pre>
  
  <p>I want to use grep to search '',' ','-' in the above vector, what is the pattern I should use to search, i want to use the same pattern in gsub.Also please explain the nitty-gritties of the pattern you are suggesting.</p>