Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

RE: comments in import files

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

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.



  • 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