[Date Index] [Thread Index] [Author Index]
RE: comments in import files
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.