|
[Date Index]
[Thread Index]
[Author Index]
Re: ReadList of Mixed Data Types???
Todd A. Guillory wrote:
>
> I need to read this file into Mathematica:
>
> George Washington
> 1732,2,22
> 1777,12,15
> 1778,1,20
>
> This is just a test, but the data file format HAS to be this way. I
> also have to use ReadList. Don't ask!
>
> Anyway, I've tried several variations of ReadList with WordSeparator and
> such NEVER get all the data, just parts.
>
> The first record is a string, the remaining three need to be 3-3 part
> list of numbers.
>
> Any suggestions greatly appreciated.
>
> email tag@io.com
I have also had trouble with ReadList, but I have a work around that has
never failed me. I read the entire data file in as a string using
Read[stream,String]. I then use the string manipulation commands to
massage it into the correct format and use ToExpression at the end to
convert it into a numerical expression. --
Remove the _nospam_ in the return address to respond.
Prev by Date:
RE: A Monte Carlo Simulation with loop structure
Next by Date:
RE: Speeding up ReadList[]?
Prev by thread:
ReadList of Mixed Data Types???
Next by thread:
Re: ReadList of Mixed Data Types???
|