Skip to content
Prev 24990 / 398502 Next

What else do tab-delimited and csv do differently?

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 

platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    6.1              
year     2002             
month    11               
day      01               
language R   

I've done this sort of thing for years, but probably not with 50
thousand rows, though I've used much bigger text files before.  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.

Is there a simple explanation?