Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Writing numeric data to CSV does not write final EOL
Replies: 5   Last Post: Sep 24, 2013 3:58 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sseziwa Mukasa

Posts: 108
Registered: 8/26/07
Re: Writing numeric data to CSV does not write final EOL
Posted: Jul 23, 2013 4:42 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

You can append an empty row:

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

On Jul 21, 2013, at 4:22 AM, kogan.clark@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
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.