G'day Peter, On Thu, 06 Dec 2007 11:52:46 +0100 Peter Dalgaard <[EMAIL PROTECTED]> wrote: > If you had looked at help(data), you would have found a list of which > file formats it supports and how they are read. Hint: TAB-delimited > files are not among them. [...]
On the other hand, "Writing R Extensions" has stated since a long time (and still does): The @file{data} subdirectory is for additional data files the package makes available for loading using @code{data()}. Currently, data files can have one of three types as indicated by their extension: plain R code (@file{.R} or @file{.r}), tables (@file{.tab}, @file{.txt}, or @file{.csv}), or @code{save()} images (@file{.RData} or @file{.rda}). Now in my book, .csv files contain comma separated values, .tab files contain values separated by TABs and .txt files are "pure" text files, presumably values separated by any kind of white space. Thus, I think that the expectation that TAB-delimited file formats should work is not unreasonable; I was long time ago bitten by this too. Then I realised that the phrase "one of the three types" should probably be interpreted as implying that .tab, .txt and .csv files are all of the same type and, apparently, should contain values separated by whitespace. I admit that I never tested whether .csv files would lead to the same problems as TAB delimited .tab files. Rather, I decided in the end that the safest option, i.e. to avoid misleading file extensions, would be to use .rda files in the future. Cheers, Berwin =========================== Full address ============================= Berwin A Turlach Tel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability +65 6515 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16, Level 7 e-mail: [EMAIL PROTECTED] Singapore 117546 http://www.stat.nus.edu.sg/~statba ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.