Re: importing and using data
- To: mathgroup at smc.vnet.net
- Subject: [mg17196] Re: [mg17106] importing and using data
- From: "Mark E. Harder" <harderm at ucs.orst.edu>
- Date: Tue, 20 Apr 1999 01:21:05 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Doug, 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 lamar.colostate.edu> To: mathgroup at smc.vnet.net 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 >difference. > >Has anyone encountered this before or know how to fix it? >Thanks, >Doug V >