title: Controlling digits in R in write.csv
body: <p>I want to write a data frame into csv which contains numeric columns as well as character columns.</p>
  
  <p>Some numeric columns are integers which I want to display as integers and some are decimals in which I need to control the number of digits after decimal and obviously no change in character columns</p>
  
  <p>How can I do this?
  Eq a particular row in that dataframe is</p>
  
  <pre><code>XYZ  8200  0.306060606 ABC
  </code></pre>
  
  <p>Output should be</p>
  
  <pre><code>XYZ 8200 0.30 ABC
  </code></pre>
  
  <p>Regards</p>