title: write.csv2 error in decimal format export
body: <p>I'm a newbie using R so maybe I'll do stupid questions and I apologize for them.</p>
  
  <p>I'm exporting a dataset from Rstudio using write.csv2 and sometimes in the same dataset numbers are converted with "," as decimal separator and sometimes they are converted with "." as decimal separator.</p>
  
  <p>I don't understand why.</p>
  
  <p>here you are finding the code I'm using:</p>
  
  <pre><code>write.csv2(LT_articolo_perimetro, file= exp_LT_1, row.names = F )
  </code></pre>
  
  <p>and below the structure of the dataset</p>
  
  <pre><code>$ CODFOR              &lt;fct&gt; 
  $ CLASSE_MERCEOLOGICA &lt;fct&gt; 
  $ CODICE_ARTICOLO     &lt;fct&gt; 
  $ media_LT_reale      &lt;time&gt; 
  $ sdev_LT_reale       &lt;dbl&gt; 
  $ LT_reale_q80        &lt;time&gt;
  $ LT_reale_q85        &lt;time&gt;
  $ LT_reale_q90        &lt;time&gt;
  $ LT_reale_q95        &lt;time&gt;
  $ LT_reale_max        &lt;time&gt;
  $ nrow                &lt;int&gt; 
  </code></pre>
  
  <p>the output is</p>
  
  <p><img src="https://i.stack.imgur.com/MmPnd.jpg" alt="Image of the error"></p>
  
  <p>Anyone knows how to fix it?</p>
  
  <p>thank you very much</p>