The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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, 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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.