Importing Large Dataset into Excel
Philippe Grosjean wrote:
The problem is often a misspecification of the comment.char argument. For read.table(), it defaults to '#'. This means that everywhere you have a '#' char in your Excel sheet, the rest of the line is ignored. This results in a different number of items per line. You should better use read.csv() which provides better default arguments for your particular problem. Best,
Or read.delim/read.delim2, which should be even better at TAB-separated files. In general, be very suspicious of read.table() with such files, not only because of the '#' but also because it expects columns separated by _arbitrary_ amounts of whitespace. I.e., n TABs counts as one, so empty fields are skipped over.
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907