Skip to content
Open
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
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^LICENSE\.md$
^design$
^pkgdown$
^\.git$
^CRAN-SUBMISSION$
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.2.0
Date: 2026-10-15 21:56:09 UTC
SHA: 09c5c0fdeb03f56e33ef1c852d172e139efdb581
41 changes: 28 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
Package: cdiscdata
Title: Versioned CDISC Standards Reference Data
Version: 0.2.0.9000
Authors@R: person("Bill", "Denney", email = "wdenney@humanpred.com",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-5759-428X"))
Description: Provides versioned CDISC Controlled Terminology (SDTM, ADaM),
variable metadata for the SDTM model, the SDTMIG, SENDIG, and ADaMIG
families of implementation guides, CDASH, and QRS supplements,
and Define-XML schemas (XSD) and CDISC XSLT stylesheets. Uses a
validity-date design to store all historical CT versions compactly
without redundant row duplication. Intended as a shared data
dependency for pharmaverse-aligned packages.
Version: 0.2.0
Authors@R: c(
person("Bill", "Denney", email = "wdenney@humanpredictions.com",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-5759-428X")),
person("Clinical Data Interchange Standards Consortium (CDISC)", role = "cph",
comment = "Define-XML schema files in inst/extdata/schema (MIT License)"),
person("Lex", "Jansen", role = "cph",
comment = "Define-XML stylesheets in inst/extdata/stylesheet (MIT License)"),
person("National Cancer Institute Enterprise Vocabulary Services", role = "dtc",
comment = "CDISC Controlled Terminology (public domain)"))
Description: Provides versioned reference data for the standards of the
Clinical Data Interchange Standards Consortium (CDISC)
<https://www.cdisc.org/standards>: the CDISC Controlled Terminology (CT)
for the Study Data Tabulation Model (SDTM) and the Analysis Data Model
(ADaM); variable metadata for the SDTM model and for the families of the
SDTM Implementation Guide (SDTMIG), the Standard for Exchange of
Nonclinical Data Implementation Guide (SENDIG), and the ADaM
Implementation Guide (ADaMIG); the Clinical Data Acquisition Standards
Harmonization (CDASH) model and implementation guide; the Questionnaires,
Ratings, and Scales (QRS) supplements; and the Define-XML schemas, written
in the Extensible Markup Language (XML) Schema Definition (XSD) language,
with Extensible Stylesheet Language Transformations (XSLT) stylesheets
for them. A validity-date design stores every historical CT version
compactly, without duplicating rows. Intended as a shared data
dependency for pharmaverse-aligned packages <https://pharmaverse.org>.
License: MIT + file LICENSE
Depends: R (>= 4.1.0)
Suggests:
Expand All @@ -21,11 +36,11 @@ Suggests:
pkgdown,
knitr,
rmarkdown,
callr,
pkgbuild
callr
LazyData: true
LazyDataCompression: xz
Encoding: UTF-8
Language: en-US
Config/testthat/edition: 3
URL: https://github.com/humanpred/cdiscdata, https://humanpred.github.io/cdiscdata/
BugReports: https://github.com/humanpred/cdiscdata/issues
Expand Down
19 changes: 15 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# cdiscdata (development version)
# cdiscdata 0.2.0

## CRAN release preparation

* First CRAN submission: the maintainer email address is corrected, the
copyright holders of the bundled Define-XML schema files (CDISC, MIT
License) and stylesheets (Lex Jansen, MIT License) are stated in
`Authors@R` and `inst/COPYRIGHTS` (the README had described them as
Apache-licensed), and a spelling word list is added.

* `inst/COPYRIGHTS` lists the source, copyright holder and licence of every bundled file and data table, including the standards metadata tables added in this version.
* Resubmission: the Description explains every acronym and links the CDISC
standards, and the attach test no longer installs the package (it runs
against the installed copy under `R CMD check` and skips from a source
tree), so pkgbuild leaves Suggests.

* `inst/COPYRIGHTS` lists the source, copyright holder, and license of every bundled file and data table, including the standards metadata tables added in this version.

## Every CDISC Library implementation-guide export, replacing the Rsdtm tables

Expand Down Expand Up @@ -143,8 +156,6 @@
to obtain them. The Rsdtm copies in `data-raw/ig_source/` and the scripts
that read them are removed.

# cdiscdata 0.2.0

## Classed conditions and coverage

* Every error and warning `get_ig()` and `build_domain_spec()` raise is now
Expand Down
2 changes: 1 addition & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#' \code{"Perm"}, \code{"Cond"}, or the published \code{"Not used"}).}
#' \item{codelist_code}{CDISC CT codelist C-code(s) the variable uses, as
#' published; several are separated by \code{"; "} (e.g. PPORRESU lists
#' PKUNIT and four normalised-unit codelists). \code{NA} when none.}
#' PKUNIT and four normalized-unit codelists). \code{NA} when none.}
#' \item{codelist_submission_values}{The codelist submission value(s),
#' where the export gives them (the SEND guides do; the SDTMIG exports do
#' not, so look the code up in \code{\link{get_ct}}).}
Expand Down
8 changes: 5 additions & 3 deletions R/get_ct.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
#' @return A data frame of CT terms valid at the requested version.
#' @export
#' @examples
#' get_ct("sdtm")
#' get_ct("sdtm", version = "2024-09-27")
#' get_ct("adam")
#' ct <- get_ct("sdtm")
#' head(ct)
#' ct_2024 <- get_ct("sdtm", version = "2024-09-27")
#' nrow(ct_2024)
#' head(get_ct("adam"))
get_ct <- function(type = c("sdtm", "adam"), version = NULL) {
type <- match.arg(type)
get_dataset(paste0("ct_", type), version = version)
Expand Down
9 changes: 6 additions & 3 deletions R/get_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
#' path string (for schemas/stylesheets).
#' @export
#' @examples
#' get_dataset("ct_sdtm")
#' get_dataset("ct_sdtm", version = "2024-09-27")
#' get_dataset("ig_adam", version = "1.3")
#' ct <- get_dataset("ct_sdtm")
#' head(ct)
#' ct_2024 <- get_dataset("ct_sdtm", version = "2024-09-27")
#' nrow(ct_2024)
#' ig_adam_1_3 <- get_dataset("ig_adam", version = "1.3")
#' nrow(ig_adam_1_3)
#' get_dataset("define_xml_schema", version = "2.1")
#' get_dataset("define_xml_stylesheet", version = "2.0")
get_dataset <- function(name, version = NULL) {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ packages (e.g. `cdisclib`, `defineauto`). Key design decisions:
| SDTM model, SDTMIG, SENDIG, ADaMIG, and related guides: variable metadata | 34 CDISC Library CSV exports, downloaded under CDISC's terms and **not redistributed**; only variable metadata is transcribed (not the CDISC Notes, Description, Definition, Notes, or Examples text); see `data-raw/README.md` | CDISC terms and conditions |
| CDASH model and CDASHIG variable metadata | 9 CDISC Library CSV exports, as above; the collection wording (question text, prompt) is carried, the definitions, mapping and CRF completion instructions, and implementation notes are not | CDISC terms and conditions |
| QRS supplement item metadata | 9 CDISC Library CSV exports, as above; the `--TEST` and `--TESTCD` names and codes are carried, the item text is not | CDISC terms and conditions |
| Define-XML 2.1 schema | [cdisc-org/DataExchange-RWD-Lineage](https://github.com/cdisc-org/DataExchange-RWD-Lineage) | Apache 2.0 |
| Define-XML 2.1 schema | [cdisc-org/DataExchange-RWD-Lineage](https://github.com/cdisc-org/DataExchange-RWD-Lineage) | MIT (CDISC) |
| Define-XML 2.0 schema | [dbosak01/defineR](https://github.com/dbosak01/defineR) | MIT |
| XSLT stylesheets | [cdisc-org/data-definition-engine](https://github.com/cdisc-org/data-definition-engine) / [dbosak01/defineR](https://github.com/dbosak01/defineR) | Apache 2.0 / MIT |
| XSLT stylesheets | [cdisc-org/data-definition-engine](https://github.com/cdisc-org/data-definition-engine) / [dbosak01/defineR](https://github.com/dbosak01/defineR) | MIT (Lex Jansen) |

## Related packages

Expand Down
59 changes: 50 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,57 @@
## Resubmission

This is a resubmission of cdiscdata 0.2.0, a new package. In this version I
have addressed each of the reviewer's comments:

* **Acronyms in the Description.** Every acronym is now explained where it
first appears: CDISC (Clinical Data Interchange Standards Consortium), CT
(Controlled Terminology), SDTM (Study Data Tabulation Model), ADaM
(Analysis Data Model), SDTMIG (SDTM Implementation Guide), SENDIG
(Standard for Exchange of Nonclinical Data Implementation Guide), ADaMIG
(ADaM Implementation Guide), CDASH (Clinical Data Acquisition Standards
Harmonization), QRS (Questionnaires, Ratings, and Scales), XML (Extensible
Markup Language), XSD (XML Schema Definition), and XSLT (Extensible
Stylesheet Language Transformations).

* **References.** The package provides reference data from the CDISC
standards with functions to retrieve it; it implements no published
method, so there is no method reference to cite. The Description now links
the CDISC standards in angle brackets, <https://www.cdisc.org/standards>.

* **Installing packages.** No function, example, or vignette installs a
package. The one installation was in a test
(tests/testthat/test-attach.R), which, when the tests ran from a source
tree, built the package and installed it into a temporary library; that
test was already skipped on CRAN. It no longer installs anything: it runs
only against the installed copy that R CMD check provides and skips
otherwise. pkgbuild, which only that test used, is removed from Suggests.

Since the first submission, the package also gained the variable metadata of
the remaining CDISC implementation guides, the CDASH model and
implementation guide, and the QRS supplements (see NEWS.md); the version
number is unchanged because 0.2.0 has not been released.

## R CMD check results

0 errors | 0 warnings | 0 notes
0 errors | 0 warnings | 1 note

* This is a new submission.

## Data sources
## Notes on the submission

All CT data is sourced from the NCI EVS FTP site (public domain, no license
restrictions). XSD schemas and XSLT stylesheets are from the CDISC
DataExchange-DefineXML GitHub repository (Apache License 2.0, included with
attribution in inst/extdata/).
* The package contains data (plus accessor functions) and has no runtime
dependencies.
* Bundled third-party files are listed with their copyright holders and
licenses in inst/COPYRIGHTS and in Authors@R: the Define-XML schema files
(CDISC, MIT License) and stylesheets (Lex Jansen, MIT License). The CDISC
Controlled Terminology data is published by the NCI Enterprise Vocabulary
Services as a public-domain work of the US Government. The variable
metadata of the CDISC standards carries only names, labels, types, and
similar fields, not the standards' text.
* The words flagged by the spell check in DESCRIPTION (ADaM, ADaMIG, CDASH,
CDISC, QRS, SDTM, SDTMIG, SENDIG, XSD, XSLT, pharmaverse) are standards
names and acronyms, each explained in the Description.

## Test environments

- Local: Ubuntu 24.04, R 4.4.x
- GitHub Actions: ubuntu-latest (R release and devel), windows-latest (R release),
macos-latest (R release)
* Local: Windows 11, R 4.6.1 (R CMD check --as-cran)
5 changes: 3 additions & 2 deletions data-raw/fetch_schemas.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Safe to re-run; existing files are not re-downloaded.
#
# Sources (both publicly available, open-source licensed):
# Define-XML 2.1: cdisc-org/DataExchange-RWD-Lineage (MIT License)
# Define-XML 2.0: dbosak01/defineR CRAN package (MIT License)
# Define-XML 2.1: cdisc-org/DataExchange-RWD-Lineage (MIT License, CDISC)
# Define-XML 2.0: dbosak01/defineR CRAN package (CC0), redistributing the
# CDISC Define-XML 2.0 schema files

RWD_BASE <- "https://raw.githubusercontent.com/cdisc-org/DataExchange-RWD-Lineage/main/tools/schema"
DEFR_BASE <- "https://raw.githubusercontent.com/dbosak01/defineR/master/inst/extdata/2.0.0/cdisc-define-2.0"
Expand Down
6 changes: 4 additions & 2 deletions data-raw/fetch_stylesheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# Safe to re-run; existing files are not re-downloaded.
#
# Sources (both publicly available, open-source licensed):
# Define-XML 2.1: cdisc-org/data-definition-engine (Apache License 2.0)
# Define-XML 2.0: dbosak01/defineR CRAN package (MIT License)
# Define-XML 2.1: cdisc-org/data-definition-engine (MIT License; the
# stylesheet itself is Copyright (c) Lex Jansen, MIT License)
# Define-XML 2.0: dbosak01/defineR CRAN package (CC0; the stylesheet itself
# is Copyright (c) Lex Jansen, MIT License)

STYLESHEET_URLS <- c(
"define2-1-0.xsl" =
Expand Down
5 changes: 0 additions & 5 deletions inst/COPYRIGHTS
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ data/ct_sdtm.rda, data/ct_adam.rda
Enterprise Vocabulary Services (https://evs.nci.nih.gov/ftp1/CDISC/), a
work of the United States Government in the public domain.

data/ig_sdtm.rda, data/ig_adam.rda
Variable metadata transcribed from the published SDTM, SDTMIG, and ADaMIG
specification documents (facts about the standards, not copies of the
documents).

data/ig_sdtm.rda, data/model_sdtm.rda, data/ig_adam.rda, data/cdash_model.rda,
data/ig_cdash.rda, data/qrs_supplement.rda, data/ig_sources.rda
Variable and item metadata of the CDISC standards (SDTM model, SDTMIG,
Expand Down
76 changes: 76 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
ADAE
ADPP
ADPP's
ADSL
ADSL's
ADaM
ADaMIG
API's
BDS
CDASH
CDASHIG
CDISC
CDISC's
CMD
CRF
Codecov
Codelist
DataExchange
Denney's
EVS
GeneTox
IG
IG's
KFSS
KPS
NCA
NCI
NCI's
OCCDS
PGI
PKPARM
PKPARMCD
PKUNIT
PP's
PPORRESU
PPTESTCD's
QRS
README
RWD
Rsdtm
SDTM
SDTMIG
SDTMIG's
SENDIG
SUPPPP
SUPPQUAL
Summarise
TTE
XPT
XSD
XSL
XSLT
YYYY
backfill
catalogue
cdisc
codelist
codelist's
codelists
dataset's
dbosak
defineR
errored
evs
gapped
nca
nci
nih
pharmaverse
popPK
rlang
schemas
stylesheet
stylesheets
subprocess
unioned
8 changes: 5 additions & 3 deletions man/get_ct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions man/get_dataset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ig_sdtm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading