Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Reading Data Table

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119931] Reading Data Table
  • From: fractal11 <trchan at mit.edu>
  • Date: Thu, 30 Jun 2011 06:30:39 -0400 (EDT)

Is there a way to read a file with a user specified word separator and record separator, such that the result is a list of lists of words?

For example, a file containing "1 2 3\n4 5 6" would become {{1,2,3}, {4,5,6}}.

Import does almost exactly what I want, although I can't figure out how to change the word and record separators.

In particular, I have a file where word separators are tab characters, but the data themselves have spaces.  Therefore, Mathematica's default word separator of whitespace does not work.


  • Prev by Date: Re: Bug in Sum?
  • Next by Date: Weighted Histogram
  • Previous by thread: Bug or limitation in Series?
  • Next by thread: Re: Reading Data Table