MathGroup Archive 1999

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

Search the Archive

Re: ReadList

  • To: mathgroup at
  • Subject: [mg18896] Re: ReadList
  • From: "P.J. Hinton" <paulh at>
  • Date: Mon, 26 Jul 1999 14:27:42 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <7n673v$> <7n8m8p$> <>
  • Sender: owner-wri-mathgroup at

On Sat, 24 Jul 1999, Mark Fisher wrote:

> In Mathematica 4, you can use Import[] to read in the file and let
> the the kernel try to parse things automatically.
> In[3]:= Import["datafile.txt", "Table", 
>           ConversionOptions -> {
>             TableSeparators -> {{"\n"}, {"\t", " "}}
>           }
>         ]
> It's not exactly clear to me what's going on with the options here. Can
> you tell us where we can read more about ConversionOptions?

Actually, there is a typo in the quoted code snippet above.  The option
name TableSeparators should be a string:

	"TableSeparators" -> {{"\n"}, {"\t", " "}}

The value for this option is a list with two elements of arbitrary length
and one dimension.  The first sublist contains strings which will be used
by Import[] to delimit record separators.  The second list is similar,
except that it lists field separators.
The documentation for these and other format-specific options can be found
in the online documentation exclusively.  Look under the reference guide
entries for Import[] an Export[].  At the end of each entry, you will find
expandable sections named "Additional Information".  Click on the
open/close icon to the left of the heading to expose the relevant content.
P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: New book on Mathematica Graphics is needed
  • Next by Date: Re: Solving difficult integral
  • Previous by thread: Re: ReadList
  • Next by thread: Re: ReadList