knitr::opts_chunk$set(echo = TRUE)
library(ready4) library(ready4fun) library(ready4class) library(ready4pack)
ready4pack
is a toolkit for bundling collections of modules for computational health economic models authored with the ready4 framework as R packages that are:
lifecycle
); sinew
, deploying a GitHub pages hosted and pkgdown
generated website and authoring PDF manuals stored in a GitHub Release via piggyback
);usethis
generated GPL-3 license); usethis
version increments).ready4pack
extends ready4 framework tools for authoring module algorithms (ready4fun) and data structures (ready4class) and wraps functions from a number of third party R development workflow tools (such as devtools
).
ready4pack
integrates these tools in a common workflow, while adding tools for authoring and documenting datasets to be shipped with model module R packages.
A combination of the ready4_pack_manifest
class and author
method are used to implement this workflow. This workflow has been used to author all public versions of the ready4 R packages available in the ready4 github repository.
The main class exported as part of ready4pack
is readypack_manifest
list based ready4 sub-module, that extends the ready4fun_manifest
and ready4class_manifest
sub-modules.
readypack_manifest
sub-module is most efficiently created with the aid of the make_pt_ready4pack_manifest
function and combines instances of the ready4fun_manifest
and ready4class_constructor
sub-modules.
x <- make_pt_ready4pack_manifest(ready4fun::ready4fun_manifest(), constructor_r3 = ready4class::ready4class_constructor()) %>% ready4pack_manifest()
The main method defined for readypack_manifest
is author
which extends the author
method for ready4class_manifest
to author a consistently documented R package.
## Not run author(x)
The program to author and document the ready4show package is relatively simple and authors:
the ready4show
package CITATION, DESCRIPTION, LICENSE and README files;
the ready4show
package website;
two versions of the ready4show
package manual - a slimmed down version for end-users and a more detailed inventory of contents intended for developers;
an initial ready4show
release for hosting supporting files, the creation of which will trigger archiving on Zenodo with a ready4show
package DOI; and
an R-CMD-check continuous integration algorithm to be implemented each time a new version of ready4show
is pushed to the main
branch of the GitHub source code repository.
The program to author and document the youthvars package is a bit more complex as it includes syntax to create package datasets. In addition to the package datasets, the algorithm creates content corresponding to the previous example, specifically:
the youthvars
package CITATION, DESCRIPTION, LICENSE and README files;
the youthvars
package website;
two versions of the youthvars
package manual - a slimmed down version for end-users and a more detailed inventory of contents intended for developers;
an initial youthvars
release for hosting supporting files, the creation of which will trigger archiving on Zenodo with a youthvars
package DOI; and
an R-CMD-check continuous integration algorithm to be implemented each time a new version of youthvars
is pushed to the main
branch of the GitHub source code repository.
A more detailed guide to using ready4pack
will be created in 2023.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.