Test data (ADaM) for the pharmaverse family of packages
To provide a one-stop-shop for ADaM test data in the pharmaverse family of packages.
The ADaM contents of this package is populated by an script that
executes the {admiral}
, {admiralonco}
,
{admiralophtha}
, {admiralvaccine}
,
{admiralpeds}
and {admiralmetabolic}
templates
and saves the resulting datasets here. This script can be executed by
the package maintainers in two scenarios:
Please check the Changelog
to see the versions of the packages used to generate the ADaM datasets
in current or past version of {pharmaverseadam}
. Please see
the Dataset Creation and Documentation Process for
details on the script.
The package is available from CRAN and can be installed with:
install.packages("pharmaverseadam")
To install the development version of the package from GitHub run:
::pkg_install("pharmaverse/pharmaverseadam", dependencies = TRUE) pak
The execution of the ADaM templates and creation of the package
documentation in {pharmaverseadam}
is semi-automated for
consistency and ease of maintenance. Metadata for each dataset such as
names, labels, descriptions, authors, and sources, is managed in a
centralized XLSX file (inst/extdata/adams-specs.xlsx
) and
used to generate .R
documentation files. These are then
used to populate the reference
pages in the package documentation.
The workflow consists of two main steps:
Firstly, the user reviews inst/extdata/adams-specs.xlsx
and ensures its contents is up-to-date. If a new template has been added
to an existing package, or if a new extension package has been created
whose ADaM templates they wish to execute in
{pharmaverseadam}
, then the user should update
adams-specs.xlsx
with specifications for the new
dataset(s). Note that any missing metadata fields will be set by default
to “No label/description/source available.”
create_adams_data.R
Secondly, the user runs data-raw/create_adams_data.R
.
This script handles the installation of each package, the execution of
the templates, the saving of the ADaM datasets and the creation of the
documentation pages.
Save specs as JSON
The script saves the specs stored in
inst/extdata/adams-specs.xlsx
as a JSON file located here:
inst/extdata/adams-specs.json
. This is so that the specs
themselves, as well as any diffs across commits, are easily viewable on
Github and R Studio.
Installs Required Packages
The script installs the following packages:
{admiral}
{admiralonco}
{admiralophtha}
{admiralvaccine}
{admiralpeds}
{admiralmetabolic}
{pharmaversesdtm}
By default, the latest development versions of each package will be
used, but the user can also select a different version instead (e.g. a
released version) with which to refresh {pharmaverseadam}
.
The user may also deselect some packages whose templates they do not
wish to run. If a new extension package has been created, this should be
added to the script in each relevant section (see the script itself for
more details).
Executes Templates from Each Package
Processes and Saves Datasets into {pharmaverseadam}
Generates Dataset Documentation
For every dataset, a matching .R
file is created in the
R/
folder containing:
data("<dataset>")
.Along with the authors and contributors, thanks to the following people for their work on the package:
G Gayatri, Daphne Grassely, Sadchla Mascary, Kangjie Zhang and Zelos Zhu.