MathGroup Archive 2007

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

Search the Archive

RE: comments in import files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74646] RE: [mg74624] comments in import files
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Thu, 29 Mar 2007 02:36:43 -0500 (EST)
  • References: <200703280936.EAA28949@smc.vnet.net>

Hi Andy,

> I would like to know if Mathematica can handle comments in 
> import files.
> In particular, I would like to add lines of comments to an 
> <emptyspace>-separated ASCII table (say, "results.dat") that 
> I produced with other programs. 
> However,
> I can't seem to find anything on how to write these comments 
> in such a way that Mathematica's function, used as
> 
> Import["results.dat","Table"];
> 
> does not complain. Help is appreciated.

It sounds pretty obvious, but I'd suggest a "suck it & see approach".

When I export a table, add some comments (in the form "# ....") and import
the file as a Table, the additional comments are correctly imported and they
do not affect the overall structure; I can easily recover the data using
Select[] statement.

My advice is to add your comments but to stick to the same convention to
ease the task of post-processing.  Test things on a small file.

Regards,

Dave.


  • Prev by Date: Re: how to pass a document to word
  • Next by Date: Re: Is this a problem in mathematica? (2nd)
  • Previous by thread: comments in import files
  • Next by thread: Re: comments in import files