Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Re: Unformatted File IO

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44478] Re: [mg44462] Re: Unformatted File IO
  • From: "Bruce W. Colletti" <bcolletti at compuserve.com>
  • Date: Wed, 12 Nov 2003 08:01:27 -0500 (EST)
  • References: <boigr2$ojk$1@smc.vnet.net> <200311110055.TAA25182@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jens

Thanks for the reply.  Unfortunately, the result:

    {{"hello, there", 2.7}, {1, 2, 3, 4}, {9, "abc", "def"}}

inserts an unwelcome comma between hello and there.

Bruce

----- Original Message ----- 
From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
To: mathgroup at smc.vnet.net
Subject: [mg44478] [mg44462] Re: Unformatted File IO


> Hi,
>
> say your data in tmp.txt, and try
>
> Import["tmp.txt", "Table"]
>
> Regards
>   Jens
>
> "Bruce W. Colletti" wrote:
> >
> > I have an unformatted text file whose records hold reals and
double-quoted
> > strings, all delimited by spaces, e.g.,
> >
> >     "hello there"  2.7
> >     1 2 3 4
> >     9    "abc"      "def"
> >
> > How can I read the file to produce a list of lists, e.g., {{hello there,
2.7},
> > {1,2,3,4}, {9, abc, def}}?
> >
> > Thanks.
> >
> > Bruce
>



  • Prev by Date: Re: Unevaluated
  • Next by Date: Re: plotting streamlines from vector data
  • Previous by thread: Re: Unformatted File IO
  • Next by thread: Re: Unformatted File IO