SpaDES modules as R packages #189
eliotmcintire
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is now new functionality in the @development (>= 1.0.9.9015) branch, namely SpaDES modules can now be converted to R packages, with no impact on our simInit and spades workflow. Many opportunities come with this...
As R packages, we can now visualize documentation for a SpaDES module and its associated functions. So, please start writing better documentation at the 1) function level using roxygen keywords (e.g., @param @details @value etc.), 2) we can use vignettes beyond the current one-and-only ".Rmd" for the module, so we can consider writing 1 or more vignettes (which are .Rmds that are placed in the vignettes folder.
Nothing changes in the current SpaDES module reality we know and love (e.g., the .R file, doEvent, .Rmd file etc. are all the same); but we now can take advantage of the duality (see Biomass_core's new web page -- which is not yet linked from anywhere -- https://predictiveecology.github.io/Biomass_core/index.html ). I have built this into an R package in a separate branch asPackage so it doesn't impact anybody working with this module.
But knowing that it is now implementable as help documentation makes it more motivating to write it (for me anyway).
I don't expect developers to make all (or even any?) modules into packages quickly. But in my tests, everything works whether traditional module or R package -- obviously you must be using the latest SpaDES.core@development (>= 1.0.9.9015) branch . Furthermore, we now have access to all the tools (e.g., for documenting, publishing, testing, code coverage etc.) that come with R packages.
See ?convertToPackage for more info.
Beta Was this translation helpful? Give feedback.
All reactions