What else do tab-delimited and csv do differently?
On Wed, Nov 06, 2002 at 02:51:20PM +1300, Patrick Connolly wrote:
Until recently, I naively believed that a csv was the same as a tab-delimited file except commas replaced tab characters (provided of course, the characters being separated weren't either). Evidently, that is not the case. I tried reading a tab-delimited file (created in Excel [2000, W2K] and ftp'd as ASCII to linux) into R
...
R just hung and I had to kill the process. Saving the file as a csv file instead was much more successful. In 16 or 17 seconds, my dataframe had been produced with no apparant effort.
Weird.
I've had some trouble with Excel before, adding a bunch of delimiters to the
end of rows, for reasons only Excel understands.
On the Linux box, try
#for the tab separated file
awk -F"\t" '{print NF}' myfile.txt | sort -u
#for the csv file
awk -F"," '{print NF}' myfile.csv | sort -u
Cheers
Jason
Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._