Raw data for domains in the pharmaversesdtm
package
To provide raw datasets which can be used to generate SDTM datsets in
the pharmaversesdtm
package. The raw dataset does not align
with any EDC (Electronic Data Capture) systems, meaning that are EDC
agnostic. The raw datasets are also data standards agnostic, meaning
some of the raw datasets are in CDASH (Clinical Data Acquisition
Standards Harmonization) and some are not in CDASH format. We have
created such examples to showcase the edc and standards agnostic
features of sdtm.oak
. The annotated case report forms
corresponding to the raw datasets are also present in the
inst\acrf
folder.
The package is available from CRAN and can be installed by running
install.packages("pharmaverseraw")
. To install the latest
development version of the package directly from GitHub use the
following code:
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
::install_github("pharmaverse/pharmaverseraw", ref = "main") # This command installs the latest development version directly from GitHub. remotes
Raw datasets are created based upon the SDTM domains in
pharmaversesdtm
package.
Datasets are named following the associated SDTM domain names with a
“_raw” appended. For example, the raw data used to create subject
disposition DS
domain is named as “ds_raw”.
Firstly, make a GitHub issue in {pharmaverseraw}
with the planned updates. Then there are two main ways to extend the
test data: either by adding new datasets or extending existing datasets
with new records/variables. Whichever method you choose, it is worth
noting the following:
data-raw/
folder.library()
at the start of the program (but please do
not call library(pharmaverseraw)
).data-raw/
folder, you need to run it as a standalone R script, in order to
generate a raw dataset that will become part of the
{pharmaverseraw}
package, but you do not need to build the
package..rda
file whose
name is consistent with the name of the dataset, e.g., dataset
xx_raw
is stored as xx_raw.rda
. The easiest
way to achieve this is to use
usethis::use_data(xx_raw)
data-raw/
are stored within the
{pharmaverseraw}
GitHub repository, but they are
not part of the {pharmaverseraw}
package–the data-raw/
folder is specified in
.Rbuildignore
.data-raw/
folder,
you generate a dataset that is written to the data/
folder,
which will become part of the {pharmaverseraw}
package.R/*.R
, for the purpose of generating documentation in the
man/
folder.pharmaversesdtm
package.data-raw/
folder, named
<name>.R
, where <name>
should
follow the naming convention, to generate the raw
data and output <name>.rda
to the data/
folder.
R/*.R
file.devtools::document()
in order to update
NAMESPACE
and update the .Rd
files in
man/
..github/CODEOWNERS
.NEWS.md
.<name>.R
in the
data-raw/
folder, update it accordingly.R/*.R
file.<name>.rda
to
the data/
folder.devtools::document()
in order to update
NAMESPACE
and update the .Rd
files in
man/
..github/CODEOWNERS
.NEWS.md
.