MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Writing numeric data to CSV does not write final EOL


You can append an empty row:

Export["C:/tmpfile.csv", Append[mytable,{}], "csv"];

On Jul 21, 2013, at 4:22 AM, kogan.clark at gmail.com wrote:

> Hi!
>
> I am using Mathematica 8 to write a numeric matrix to a csv file using the commands:
>
> mytable = {{1, 2}, {3, 4}};
> mytable = Export["C:/tmpfile.csv", mytable, "csv"];
>
>
> This produces a file, but does not put a final line end character after the 4. I am trying to read this file with R, which requires the final line end character. I was wondering if anyone knew the simplest (or a very simple) way to add the additional line end character.
>
> Thanks!
>
> Clark
>




  • Prev by Date: Re: Extract Integers
  • Next by Date: Variable transformations
  • Previous by thread: Writing numeric data to CSV does not write final EOL
  • Next by thread: Graduate student new to Mathematica would like to hire a tutor in