title: Removing Dash with any number and at any position in R
body: <p>I have data frame like this :</p>
  <pre><code>df_out &lt;- data.frame(
    &quot;name&quot; = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;),
    &quot;col1&quot;=rep(&quot;BA-&quot;,times= 8),
    &quot;col2&quot;=rep(&quot;-BA&quot;,times= 8),
    &quot;col3&quot;=rep(&quot;G-G&quot;,times= 8),
    &quot;col4&quot;=rep(&quot;-&quot;,times= 8),
    &quot;col5&quot;=rep(&quot;--&quot;,times= 8),
    &quot;col6&quot;=rep(&quot;---&quot;,times= 8))
  df_out
  </code></pre>
  <p>I want to replace any dash at any position with any number by na. I'm using na-if function.
  So the output should be like this :</p>
  <pre><code> df_out
    name col1 col2 col3 col4 col5 col6
  1    1   NA   NA   NA   NA   NA   NA
  2    2   NA   NA   NA   NA   NA   NA
  3    3   NA   NA   NA   NA   NA   NA
  4    4   NA   NA   NA   NA   NA   NA
  5    5   NA   NA   NA   NA   NA   NA
  6    6   NA   NA   NA   NA   NA   NA
  7    7   NA   NA   NA   NA   NA   NA
  8    8   NA   NA   NA   NA   NA   NA
  </code></pre>
  <p>Can you please help me?
  Thank you</p>