title: Reading a csv file in R
body: <p>I am trying to read some data written in R from a csv file instead using the data frame.</p>
  <p>I used <code>read.csv</code> to extract the data from the file but I got always this error <code> In read.table(file = file, header = header, sep = sep, quote = quote,  : line 1 appears to contain embedded nulls</code> .</p>
  <p>This is a piece of the code in R using the data frame:</p>
  <pre><code>COL &lt;- c(&quot;Fallow&quot; = &quot;slategray&quot;, &quot;Mustard&quot; = &quot;red3&quot; , &quot;Mix4&quot; = &quot;orchid3&quot;, &quot;Mix12&quot;= &quot;orange4&quot;)
  SHP &lt;- c(&quot;Fallow&quot;=21,&quot;Mustard&quot;=22,&quot;Mix4&quot;=23, &quot;Mix12&quot;=24)
  
  
  # generate data frame with original data
  data &lt;- data.frame(cc_variant = structure(c(1L, 1L, 1L, 3L, 4L, 2L, 3L, 4L, 2L, 2L, 4L, 3L), .Label = c(&quot;Fallow&quot;, &quot;Mustard&quot;, &quot;Mix4&quot;, &quot;Mix12&quot;), class = &quot;factor&quot;),
                     Date = structure(c(17092, 17093, 17098, 17092, 17092, 17092, 17093, 17093, 17093, 17098, 17098, 17098), class = &quot;Date&quot;),
                     NEE = c(52.3186092, 36.752742, 34.590816, -516.868370737168, -617.110003978854, -182.24567563611, -102.63776100067, -431.558870280712, -139.041211720174, -114.099387563412, -400.212603947375, -175.332083704246)
  )
  
  
  lm_NEE &lt;- lmer(NEE ~ cc_variant + (1|Date), data=data)
  df_NEE &lt;- cld(emmeans(lm_NEE, specs =&quot;cc_variant&quot;), Letters=letters, sort=FALSE)
  
  # Plot for BFS
  ggplot(data, aes(x= cc_variant, y=NEE, fill= cc_variant))+
    geom_boxplot()+
    scale_fill_manual(values = COL, guide=FALSE)+
    geom_text(data= df_NEE ,aes(y=-600,x=cc_variant, label=.group))+
    labs(x=&quot;Catch crop variant&quot;,  y=expression(&quot;NEE (mg CO&quot;[2]~&quot;- C&quot;~m^{-2}~h^{-1}~&quot;)&quot;), fill=&quot;&quot;)+
    theme_myBW
  
  ggsave(&quot;Fig1.png&quot;, width = 84, height = 70, units = &quot;mm&quot;, dpi = 600)
  </code></pre>
  <p>This how the data  frame looks:</p>
  <pre><code> cc_variant       Date        NEE
  1      Fallow 2016-10-18   52.31861
  2      Fallow 2016-10-19   36.75274
  3      Fallow 2016-10-24   34.59082
  4        Mix4 2016-10-18 -516.86837
  5       Mix12 2016-10-18 -617.11000
  6     Mustard 2016-10-18 -182.24568
  7        Mix4 2016-10-19 -102.63776
  8       Mix12 2016-10-19 -431.55887
  9     Mustard 2016-10-19 -139.04121
  10    Mustard 2016-10-24 -114.09939
  11      Mix12 2016-10-24 -400.21260
  12       Mix4 2016-10-24 -175.33208
  </code></pre>
  <p>This is my try:</p>
  <pre><code># set vector with colors and label
  COL &lt;- c(&quot;Fallow&quot; = &quot;slategray&quot;, &quot;Mustard&quot; = &quot;red3&quot; , &quot;Mix4&quot; = &quot;orchid3&quot;, &quot;Mix12&quot;= &quot;orange4&quot;)
  SHP &lt;- c(&quot;Fallow&quot;=21,&quot;Mustard&quot;=22,&quot;Mix4&quot;=23, &quot;Mix12&quot;=24)
  
  
  # generate data frame with original data
  data &lt;- read.csv(&quot;C:\\Users\\aganfoud\\Desktop\\orkg-stencila\\Gentsch2020\\data.csv&quot;, header=T, sep = ';')
  datalm_NEE &lt;- lmer(NEE ~ cc_variant + (1|Date), data=data)
  df_NEE &lt;- cld(emmeans(lm_NEE, specs =&quot;cc_variant&quot;), Letters=letters, sort=FALSE)
  
  # Plot for BFS
    fig1 &lt;- ggplot(data, aes(x= cc_variant, y=NEE, fill= cc_variant))+
    geom_boxplot()+
    scale_fill_manual(values = COL, guide=FALSE)+
    geom_text(data= df_NEE ,aes(y=-600,x=cc_variant, label=.group))+
    labs(x=&quot;Catch crop variant&quot;,  y=expression(&quot;NEE (mg CO&quot;[2]~&quot;- C&quot;~m^{-2}~h^{-1}~&quot;)&quot;), fill=&quot;&quot;)+
    theme_myBW
  
  ggsave(&quot;Fig1.png&quot;, width = 84, height = 70, units = &quot;mm&quot;, dpi = 600)
  </code></pre>
  <p>and finally this is how I create my csv file:</p>
  <p><a href="https://i.stack.imgur.com/3SfmN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3SfmN.png" alt="CSV File" /></a></p>