title: How to remove double quotes around NULL values in write.csv?
body: <p>I am working on exporting a data.frame to a csv for use in an ecommerce system after I have done some analysis on it. </p>
  
  <p>I am removing the NA values before the extract as they are not allowed in the system I am adding the data to. The process I have looks like this, my data.frame is called prod_out:</p>
  
  <pre><code>prod_out[is.na(prod_out)] &lt;- c("")
  
  prod_con&lt;-file('product_output.csv',encoding="utf8")
  
  write.csv(prod_out,file=prod_con,append=FALSE,eol="\r",quote=TRUE,row.names=FALSE)
  </code></pre>
  
  <p>This generates the file, however, for the fields that are NULL they are all double quoted like this:</p>
  
  <pre><code>...,"",...
  </code></pre>
  
  <p>I need to not have the double quotes for NULL fields and leave them for any character field like this:</p>
  
  <pre><code>...,,...
  </code></pre>
  
  <p>I did change quote=FALSE, however that removed all double quoting and I need the character fields to remain intact. Is there any way to unquote the NULL values?</p>
  
  <p>Any help is appreciated. </p>
  
  <p>Thanks,</p>
  
  <p>Jason</p>