title: How to replace "* * *" with NA in r?
body: <p>This is how my dataframe looks like:</p>
  <pre class="lang-r prettyprint-override"><code>&gt; str(CORUCHE3_new)
  
  'data.frame':   313920 obs. of  10 variables:        
   $ N    : int  1 2 3 4 5 6 7 8 9 10 ...        
   $ Date : chr  &quot;2015-07-27 00:00:00&quot; &quot;2015-07-27 00:05:00&quot; &quot;2015-07-27 00:10:00&quot; &quot;2015-07-27 00:15:00&quot; ...        
   $ UI630: chr  NA NA NA NA ...        
   $ UI800: chr  NA NA NA NA ...        
   $ UR630: chr  NA NA NA NA ...        
   $ UR800: chr  NA NA NA NA ...        
   $ UI532: chr  NA NA NA NA ...        
   $ UI570: chr  NA NA NA NA ...        
   $ UR532: chr  NA NA NA NA ...        
   $ UR570: chr  NA NA NA NA ...
  </code></pre>
  <p>In the columns UR630 UR800 UR532 UR570 some rows were automatically filled with &quot;* * <em>&quot;by the datalogger. I've been trying to replace the &quot;</em>**&quot;with NA but without success.</p>
  <p>How can I replace this &quot;* * *&quot; by NA?</p>
  <p>These are some of the codes that I've been using:</p>
  <pre class="lang-r prettyprint-override"><code>CORUCHE3_new[CORUCHE3_new == &quot;* * *&quot;] &lt;- NA        
  CORUCHE3_new &lt;- replace(CORUCHE3_new, CORUCHE3_new == &quot;* * *&quot;, NA)          
  CORUCHE3_new&lt;-CORUCHE3_new %&gt;% replace(&quot;* * *&quot;, NA)      
  CORUCHE3_new$UR570 &lt;- replace(CORUCHE3_new$UR570, CORUCHE3_new$UR570 == '* * *', NA)
  </code></pre>
  <p>For instance, I would also try to find a code where I would replace all &quot;***&quot; independently of the column.</p>
  <p>Any help will be much appreciated!</p>