I am writing a package which uses hierarchical data which are fixed (same across different applications of the package, such as a ), and which I built using the data.tree package.
Is it possible to export the data object? Would I rather use the data subdirectory to store the code in binary? Or in a json file? Or would I write and export R code which builds the structure from a downloaded file?
My recent attempts have been to store the data in *.rda files which I put in data (say, "topoTree.rda"), then document the file in topoTree.R and put the lines
@export topoTree
"topoTree"
at the end of the file. After running devtools::load_all()
and devtools::document()
, an object name topoTree
is not exported.
Documenting functions • roxygen2 mentions that in most cases, functions are exported, but does not elaborate on exporting objects which are not functions.
I seem to fundamentally misunderstand something.