MathGroup Archive 1999

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

Search the Archive

Re: importing and using data

  • To: mathgroup at
  • Subject: [mg17196] Re: [mg17106] importing and using data
  • From: "Mark E. Harder" <harderm at>
  • Date: Tue, 20 Apr 1999 01:21:05 -0400
  • Sender: owner-wri-mathgroup at

    I have had success with:

ReadList[dataStream, Number, RecordLists->True, RecordSeparators->{"\n"}  ];

Your problem may be that Mathematica does not know how to parse the
boundaries between records & it needs the extra 2 options set as shown.
Also, Tab-delimiters seem to be "natural" field delimiters in Mtca.  When
commas, spaces, etc. are used, I read the data stream not with "Number",but
as a string of words and use "," or " " and so forth as the "WordSeparator".
Then the list variables extracted from the resulting List-of-Lists of Words
are converted to numbers with "ToExpression".  Good Luck.
-mark harder.

-----Original Message-----
From: Doug VanGoethem <vango at>
To: mathgroup at
Subject: [mg17196] [mg17106] importing and using data

>I have a large, one column data set in a tab-delimited text file.  It
>appears to read correctly when I use data=ReadList["filename", Number], but
>when I tried to do a ListPlot or perform a Fourier transform I get an error
>message that says it is not a list of numbers or pairs of numbers.  I have
>also tried data=Transpose[Readlist[....]], but this did not make any
>Has anyone encountered this before or know how to fix it?
>Doug V

  • Prev by Date: LabeledListPlot w/Log Axes?
  • Next by Date: Re: Dialog for selecting a file to be read
  • Previous by thread: importing and using data
  • Next by thread: Re: importing and using data