Re: ReadList
- To: mathgroup at smc.vnet.net
- Subject: [mg27230] Re: ReadList
- From: vze295bp at verizon.net (David Reiss)
- Date: Mon, 12 Feb 2001 03:21:12 -0500 (EST)
- Organization: Scientific Arts
- References: <960ata$p3f@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <960ata$p3f at smc.vnet.net>, Matthias.Bode at oppenheim.de wrote:
> Dear Colleagues:
>
> I have to read an external file.txt:
>
> ReadList["D:\theirfile.txt", Record, RecordList->True]//N
>
> This works and yields the appropriately partitioned list but gives me - as
> InputForm proves - a list in which the numbers are (expletive deleted)
> words:
>
> mylistoftheirfile = {{"0.001, 0.2, ..."}, {"..."}, ....}
>
> How can I convert the "words" to plain rational numbers that will be
> amenable to a principal component analysis, my ultimate aim?
>
> Thank you for your help.
>
> Best regards,
>
> Matthias Bode
> Sal. Oppenheim jr. & Cie. KGaA
> Koenigsberger Strasse 29
> D-60487 Frankfurt am Main
> GERMANY
> Tel.: +49(0)69 71 34 53 80
> Mobile: +49(0)172 6 74 95 77
> Fax: +49(0)69 71 34 6380
> E-mail: matthias.bode at oppenheim.de
> Internet: http://www.oppenheim.de
If I understand your problem correctly (that your
file is a rectangular array of floats)
then this should probably work:
ReadList["D:\theirfile.txt", Number, RecordList->True]
Cheers,
David
--
) Scientific Arts: http://www.scientificarts.com
) Creative Services and Consultation for the Applied
) and Pure Sciences:: David Reiss: dreiss at !SPAMscientificarts.com
) [Remove the !SPAM to send email]