Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
^vignettes/adxx\.Rmd$
^vignettes/pharmaversesdtm\.Rmd$
^data-raw$
^inst/extdata/.*\.csv$
^CRAN-SUBMISSION$
^cran-comments\.md$
^.devcontainer$
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Documentation

- Included CSV versions of all SDTM data under `inst/extdata` for ease of use of non R programmers. (#221)
- Added a new vignette "Datasets Preview" to preview all datasets included in the package. (#146)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This news item is not in line with the issue that this PR is tackling - is this intended?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one comes from main but I am not sure if to you is appearing as a PR change... here is for me when I review files changed:

image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok np then!


# pharmaversesdtm 1.4.0
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Test data (SDTM) for the pharmaverse family of packages

- [Purpose](#purpose)
- [Installation](#installation)
- [Data Sources](#data-sources)
- [Data](#data)
- [Naming Conventions](#naming)
- [How To Update](#how-to-update)

Expand All @@ -33,10 +33,17 @@ if (!requireNamespace("remotes", quietly = TRUE)) {
remotes::install_github("pharmaverse/pharmaversesdtm", ref = "main") # This command installs the latest development version directly from GitHub.
```

## Data Sources {#data-sources}

## Data {#data}

### Data Sources

Some test datasets have been sourced from the [CDISC pilot project](https://github.com/cdisc-org/sdtm-adam-pilot-project), while other datasets have been constructed ad-hoc by the {admiral} team. Please check the [Reference page](https://pharmaverse.github.io/pharmaversesdtm/reference/index.html) for detailed information regarding the source of specific datasets.

### Data Formats

Each dataset is provided in both RDA and CSV formats. The `.rda` files are used within the R package and saved in the [data](https://github.com/pharmaverse/pharmaversesdtm/tree/main/data) folder, while the `.csv` files are saved in the [inst/extdata/](https://github.com/pharmaverse/pharmaversesdtm/tree/main/inst/extdata) folder.

## Naming Conventions {#naming}

- Datasets that are TA-agnostic: same as SDTM domain name (e.g., `dm`, `rs`).
Expand Down Expand Up @@ -80,7 +87,7 @@ This metadata drives the automated documentation process, and the file is read b

### Adding New SDTM Datasets

- Create a program in the `data-raw/` folder, named `<name>.R`, where `<name>` should follow the [naming convention](#naming), to generate the test data and output `<name>.rda` to the `data/` folder.
- Create a program in the `data-raw/` folder, named `<name>.R`, where `<name>` should follow the [naming convention](#naming), to generate the test data and output `<name>.rda` to the `data/` folder, and the `<name>.csv` to the `inst/extdata` folder.
- Use CDISC pilot data such as `dm` as input in this program in order to create realistic synthetic data that remains consistent with other domains (not mandatory).
- Note that **no personal data should be used** as part of this package, even if anonymized.
- Run the program.
Expand All @@ -99,7 +106,7 @@ This metadata drives the automated documentation process, and the file is read b
- Modifying the dataset purpose or structure.
- Updating the dataset therapeutic area.
- Removing a dataset (delete its entry from the JSON entirely).
- Run the program, and output updated `<name>.rda` to the `data/` folder.
- Run the program, and output updated `<name>.rda` to the `data/` folder, and the `<name>.csv` to the `inst/extdata` folder.
- Run `data-raw/create_sdtms_data.R` in order to update `NAMESPACE` and update the `.Rd` files in `man/`.
- Add your GitHub handle to `.github/CODEOWNERS`.
- Update `NEWS.md`.
Expand Down
5 changes: 4 additions & 1 deletion data-raw/create_sdtms_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ for (dataset_name in datasets) {
dataset <- get(dataset_name)
metadata <- specs[specs$name == dataset_name, ]

# For each dataset, save a CSV version in inst/extdata/
write.csv(dataset, file = file.path("inst/extdata/", paste0(dataset_name, ".csv")), row.names = FALSE)

# Add Test Codes and Test Names details in a table
# Identify column names ending in TEST and TESTCD
test_col <- names(dataset)[str_detect(string = names(dataset), pattern = "TEST$")]
Expand Down Expand Up @@ -201,7 +204,7 @@ for (dataset_name in datasets) {
# Add Therapeutic area keyword to the dataset name
dataset_keyword <- get_dataset_keyword(dataset_name, specs)
}

# Write the R documentation
write_doc(dataset, dataset_name, dataset_label, dataset_description, dataset_author, dataset_source, dataset_testnames, dataset_keyword)
}

Expand Down
3 changes: 1 addition & 2 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ ISTEST
ISTESTCD
Immunogenicity
Intraocular
JSON
Kangjie
Kumari
LAMZ
Expand Down Expand Up @@ -141,7 +140,6 @@ RECIST
RENALCL
RSTEST
RSTESTCD
Recode
Retinopathy
Rohan
SCTEST
Expand Down Expand Up @@ -214,6 +212,7 @@ ae
anonymized
anthropometric
antidrug
extdata
flavoured
funder
iRECIST
Expand Down
1,192 changes: 1,192 additions & 0 deletions inst/extdata/ae.csv

Large diffs are not rendered by default.

1,192 changes: 1,192 additions & 0 deletions inst/extdata/ae_ophtha.csv

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions inst/extdata/ag_neuro.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"STUDYID","DOMAIN","USUBJID","AGSEQ","AGTRT","AGCAT","AGDOSE","AGDOSEU","AGROUTE","AGLNKID","VISITNUM","VISIT","AGSTDTC"
"CDISCPILOT01","AG","01-701-1015",1,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",2,3,"BASELINE","2014-01-02"
"CDISCPILOT01","AG","01-701-1015",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-12-29"
"CDISCPILOT01","AG","01-701-1015",3,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",5,9,"WEEK 12","2014-03-26"
"CDISCPILOT01","AG","01-701-1015",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2014-03-28"
"CDISCPILOT01","AG","01-701-1015",5,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",8,13,"WEEK 26","2014-07-02"
"CDISCPILOT01","AG","01-701-1015",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2014-06-28"
"CDISCPILOT01","AG","01-701-1023",1,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",2,3,"BASELINE","2012-08-05"
"CDISCPILOT01","AG","01-701-1023",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2012-08-03"
"CDISCPILOT01","AG","01-701-1028",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-07-19"
"CDISCPILOT01","AG","01-701-1028",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-07-15"
"CDISCPILOT01","AG","01-701-1028",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2013-10-09"
"CDISCPILOT01","AG","01-701-1028",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-10-06"
"CDISCPILOT01","AG","01-701-1028",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2014-01-14"
"CDISCPILOT01","AG","01-701-1028",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2014-01-17"
"CDISCPILOT01","AG","01-701-1034",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2014-07-01"
"CDISCPILOT01","AG","01-701-1034",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2014-06-27"
"CDISCPILOT01","AG","01-701-1034",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2014-09-25"
"CDISCPILOT01","AG","01-701-1034",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2014-09-21"
"CDISCPILOT01","AG","01-701-1034",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2014-12-30"
"CDISCPILOT01","AG","01-701-1034",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2014-12-28"
"CDISCPILOT01","AG","01-701-1146",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-05-20"
"CDISCPILOT01","AG","01-701-1146",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-05-16"
"CDISCPILOT01","AG","01-701-1153",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-09-23"
"CDISCPILOT01","AG","01-701-1153",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-09-20"
"CDISCPILOT01","AG","01-701-1153",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2013-12-16"
"CDISCPILOT01","AG","01-701-1153",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-12-18"
"CDISCPILOT01","AG","01-701-1153",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2014-04-01"
"CDISCPILOT01","AG","01-701-1153",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2014-04-04"
"CDISCPILOT01","AG","01-701-1181",1,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",2,3,"BASELINE","2013-12-05"
"CDISCPILOT01","AG","01-701-1181",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-12-02"
"CDISCPILOT01","AG","01-701-1234",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-03-30"
"CDISCPILOT01","AG","01-701-1234",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-03-26"
"CDISCPILOT01","AG","01-701-1234",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2013-07-07"
"CDISCPILOT01","AG","01-701-1234",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-07-11"
"CDISCPILOT01","AG","01-701-1234",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2013-09-22"
"CDISCPILOT01","AG","01-701-1234",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2013-09-20"
"CDISCPILOT01","AG","01-701-1275",1,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",2,3,"BASELINE","2014-02-07"
"CDISCPILOT01","AG","01-701-1275",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2014-02-03"
"CDISCPILOT01","AG","01-701-1275",3,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",5,9,"WEEK 12","2014-05-03"
"CDISCPILOT01","AG","01-701-1275",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2014-04-29"
"CDISCPILOT01","AG","01-701-1302",1,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",2,3,"BASELINE","2013-08-29"
"CDISCPILOT01","AG","01-701-1302",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-08-26"
"CDISCPILOT01","AG","01-701-1302",3,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",5,9,"WEEK 12","2013-11-05"
"CDISCPILOT01","AG","01-701-1302",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-11-09"
"CDISCPILOT01","AG","01-701-1345",1,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",2,3,"BASELINE","2013-10-08"
"CDISCPILOT01","AG","01-701-1345",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-10-06"
"CDISCPILOT01","AG","01-701-1345",3,"18F-Florbetaben","AMYLOID TRACER","300","MBq","Intravenous",5,9,"WEEK 12","2013-12-31"
"CDISCPILOT01","AG","01-701-1345",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-12-28"
"CDISCPILOT01","AG","01-701-1360",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-07-31"
"CDISCPILOT01","AG","01-701-1360",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-07-28"
"CDISCPILOT01","AG","01-701-1383",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-02-04"
"CDISCPILOT01","AG","01-701-1383",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-02-02"
"CDISCPILOT01","AG","01-701-1383",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2013-04-30"
"CDISCPILOT01","AG","01-701-1383",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-04-28"
"CDISCPILOT01","AG","01-701-1383",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2013-08-06"
"CDISCPILOT01","AG","01-701-1383",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2013-08-02"
"CDISCPILOT01","AG","01-701-1392",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2012-10-28"
"CDISCPILOT01","AG","01-701-1392",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2012-10-24"
"CDISCPILOT01","AG","01-701-1392",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2013-01-20"
"CDISCPILOT01","AG","01-701-1392",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2013-01-17"
"CDISCPILOT01","AG","01-701-1392",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2013-04-28"
"CDISCPILOT01","AG","01-701-1392",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2013-05-02"
"CDISCPILOT01","AG","01-714-1288",1,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",1,3,"BASELINE","2013-12-04"
"CDISCPILOT01","AG","01-714-1288",2,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",3,3,"BASELINE","2013-12-02"
"CDISCPILOT01","AG","01-714-1288",3,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",4,9,"WEEK 12","2014-03-02"
"CDISCPILOT01","AG","01-714-1288",4,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",6,9,"WEEK 12","2014-03-04"
"CDISCPILOT01","AG","01-714-1288",5,"18F-Florbetapir","AMYLOID TRACER","370","MBq","Intravenous",7,13,"WEEK 26","2014-06-17"
"CDISCPILOT01","AG","01-714-1288",6,"18F-Flortaucipir","TAU TRACER","370","MBq","Intravenous",9,13,"WEEK 26","2014-06-20"
Loading
Loading