Skip to content

Good practice for data() for R-packages

2 messages · Johannes Radinger, Uwe Ligges

#
Hi,

I am compiling a R-package and have two tables (.rda files) that are used
by the functions in my package. In the manual for ?data
(http://stat.ethz.ch/R-manual/R-patched/library/utils/html/data.html),
there is a chapter on good practice for such "sysdata"..

However what is not clear to me yet:

1) Probably I need to do the second approach:
"For objects which are system data, for example lookup tables used in
calculations within the function, use a file ?R/sysdata.rda? in the
package sources or create the objects by R code at package
installation time."
But what if I have two rda-files? Is the "sysdata.rda" a fixed name
(name convention)?

2) How should these rda-table be used/loaded in the package functions?
is data() still working/okay?

/johannnes
1 day later
#
On 05.03.2013 11:21, Johannes Radinger wrote:
But both objects into the same rda file.
The objects will be available in your NAMESPACE.

Best,
Uwe ligges