[R] data files for packages

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Aug 22 21:34:28 CEST 2004


On Sun, 22 Aug 2004, Mikkel Grum wrote:

> This must be really simple and clearly expained
> somewhere, but I can't find it. I'm writing an
> R-package and want to create data sets for the
> examples.  How do I save them in the format needed for
> a package?

It's in `Writing R Extensions' (in the subsection entitled `Package
subdirectories') and also in ?data.  There are several possible formats.

If the question was how to produce .rda files, use for dataset foo

    save(foo, file="foo.rda", compress=TRUE)


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list