title: Is there a way to replace NAs in muliple columns in an R dataframe
body: <p>I am using the below code to replace N/As in multiple columns (but not all columns) in an R dataframe , however I am devoting a line of code for each column. I wondered if there is a cleaner and tidyier way of doing this. See code below</p>
  <pre><code>csvDF$Carechildinneed[is.na(csvDF$Carechildprotectionplan)] &lt;- &quot;&quot;
  csvDF$Carechildprotectionplan[is.na(csvDF$Carechildprotectionplan)] &lt;- &quot;&quot;
  csvDF$Careeligiblechild[is.na(csvDF$Careeligiblechild)] &lt;- &quot;&quot;
  csvDF$Careorder[is.na(csvDF$Careorder)] &lt;- &quot;&quot;
  csvDF$Carerelevantchild[is.na(csvDF$Carerelevantchild)] &lt;- &quot;&quot;
  csvDF$Careremandtolaa[is.na(csvDF$Careremandtolaa)] &lt;- &quot;&quot;
  csvDF$Careremandtoyda[is.na(csvDF$Careremandtoyda)] &lt;- &quot;&quot;
  csvDF$Caresiblings[is.na(csvDF$Caresiblings)] &lt;- &quot;&quot;
  csvDF$Carevoluntary[is.na(csvDF$Carevoluntary)] &lt;- &quot;&quot;
  </code></pre>