An idea for something better than read.table

Martyn Plummer
Fri, 26 Feb 1999 12:22:27 +0100

Kjetil Halvorsen wrote:
> It is nice if data files can have formats not to heavily
> dependent on the package.  What I do to read in data is
> having data (whith header) in, say, data.dat, and then data.R
> with the commands for defining factors, levels, contrast or
> whatever. That seems cleaner than mixing in one file data and
> definitions.

If you want a file format for R datasets which describe their
own metadata, it might be worth thinking about defining it in

This probably goes a long way beyong Peter's suggestion, but
presumably it could be done in the same way, by adding a header
to the top of a data file. It does leave open the possibility
that other statistical packages will be able to read the data
and extract any meta data (storage type, variable labels, value
labels, ...) they want to use.

I have been thinking for a long time that it would be nice if
statistical packages could exchange datasets using a common
file format and (unless I have drastically misunderstood) XML
seems the way to go.

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: