Re: Re: Re: Re: Bug in Import?

*To*: mathgroup at smc.vnet.net*Subject*: [mg54892] Re: [mg54833] Re: [mg54797] Re: [mg54765] Re: Bug in Import?*From*: DrBob <drbob at bigfoot.com>*Date*: Sat, 5 Mar 2005 01:34:36 -0500 (EST)*References*: <cvum3g$bmp$1@smc.vnet.net> <200503010658.BAA25162@smc.vnet.net> <200503020626.BAA08089@smc.vnet.net> <opsm0z49wuiz9bcq@monster.ma.dl.cox.net> <200503041007.FAA12962@smc.vnet.net>*Reply-to*: drbob at bigfoot.com*Sender*: owner-wri-mathgroup at wolfram.com

Saying it's a failure of documentation implies there's a benign explanation. If you can't suggest one, why do you think so? (Anyway, the documentation in this case effectively IS a bug.) Meanwhile, it's a fact that two identical records are imported differently, and it's hard to imagine (in my opinion) a good reason for that. It's not just DAT, either. Exactly the same thing happens with the CSV, TSV, and Table formats. Bobby On Fri, 4 Mar 2005 05:07:32 -0500 (EST), Murray Eisenberg <murray at math.umass.edu> wrote: > _I_ cannot discern what that behavior is; that's why the documentation > would be desirable! All I can really infer so far from the experiments > is that .dat files are not, by default treated as text. > > That the two records of the test .dat file give different results when > imported with the default behavior may or may not be a bug. I don't > know what the format expected of a .dat file is. > > > DrBob wrote: >>>> Rather than a bug, the behavior originally cited would seem to >>>> be a failure of the documentation to describe the default behavior >>>> of Import when the file extension is ".dat". >> >> >> Then describe it, please, so this behavior makes sense. >> >> Bobby >> >> On Wed, 2 Mar 2005 01:26:43 -0500 (EST), Murray Eisenberg >> <murray at math.umass.edu> wrote: >> >>> Here's what I get: >>> >>> $Version >>> 5.1 for Microsoft Windows (October 25, 2004) >>> >>> Export["test.dat", {{"2005-01-24", "2005-02-14"}, >>> {"2005-01-24", "2005-02-14"}}]; >>> >>> Import["test.dat", "Text"] // InputForm >>> "2005-01-24 2005-02-14\n2005-01-24 2005-02-14" >>> >>> Import["test.dat"] >>> {{"2005-01-24", "2005-02-14"}, {2005, -1, -24, 2005, >>> -2, -14}} >>> >>> Rather than a bug, the behavior originally cited would seem to be a >>> failure of the documentation to describe the default behavior of Import >>> when the file extension is ".dat". >>> >>> >>> meznaric wrote: >>> >>>> Hm, this seems strange. I am using 4.1 and what happens is this: >>>> >>>> Export["R:\\test.dat", >>>> {{"2005-01-24", "2005-02-14"}, >>>> { "2005-01-24", "2005-02-14"}}] >>>> >>>> Import["R:\\test.dat"] >>>> {{1980, 1989}, {1980, 1989}} >>>> >>>> !! R:\\test.dat >>>> 2005-01-24 2005-02-14 >>>> 2005-01-24 2005-02-14 >>>> >>>> In the Import case Mathematica seems to have actually evaluated those >>>> cells as if they hadn't been strings, but integers. >>>> >>>> In your case, it certainly seems to be a bug, though. How can two >>>> identical list parts be exported/imported in a different way? >>>> >>>> Regards, >>>> Sebastjan Meznaric >>>> >>>> >>> >> >> >> > -- DrBob at bigfoot.com www.eclecticdreams.net

**References**:**Re: Bug in Import?***From:*"meznaric" <meznaric@gmail.com>

**Re: Re: Bug in Import?***From:*Murray Eisenberg <murray@math.umass.edu>

**Re: Re: Re: Bug in Import?***From:*Murray Eisenberg <murray@math.umass.edu>