title: Setting all NA to blank in r Dataframe
body: <p>I've been successful most of the time but in one instance the following code, throws error.</p>
  <p><strong>Error: character string is not in a standard unambiguous format</strong></p>
  <pre><code>current[is.na(current)] = &quot;&quot;
  </code></pre>
  <p>The following works. But how do I avoid writing 3 times?</p>
  <pre><code>isnaColumns &lt;- sapply(current, is.character)
  current[,isnaColumns] &lt;- lapply(current[,isnaColumns], function(z) replace(z, is.na(z), &quot;&quot;))
  
  isnaColumns &lt;- sapply(current, is.numeric)
  current[,isnaColumns] &lt;- lapply(current[,isnaColumns], function(z) replace(z, is.na(z), &quot;&quot; ))
  
  isnaColumns &lt;- sapply(current, is.logical)
  current[,isnaColumns] &lt;- lapply(current[,isnaColumns], function(z) replace(z, is.na(z), &quot;&quot; ))
  </code></pre>