[R] Good practice for data() for R-packages
Johannes Radinger
johannesradinger at gmail.com
Tue Mar 5 11:21:57 CET 2013
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
More information about the R-help
mailing list