From fb7f90e9e443343c4609bc6266f591cafbac25e3 Mon Sep 17 00:00:00 2001 From: Rammprasad Ganapathy Date: Tue, 27 Aug 2024 04:47:18 +0000 Subject: [PATCH] Fix Cran comments --- R/cnd_df.R | 5 +++++ R/ct.R | 1 - R/dtc_create_iso8601.R | 3 +++ R/pipe.R | 2 ++ README.md | 28 +++++++++++----------------- man/create_iso8601.Rd | 3 +++ man/ctl_new_rowid_pillar.cnd_df.Rd | 3 +++ man/dot_pipe.Rd | 3 +++ man/mutate.cnd_df.Rd | 3 +++ man/tbl_sum.cnd_df.Rd | 3 +++ 10 files changed, 36 insertions(+), 18 deletions(-) diff --git a/R/cnd_df.R b/R/cnd_df.R index 5fcf588d..e8d00f9c 100644 --- a/R/cnd_df.R +++ b/R/cnd_df.R @@ -177,6 +177,8 @@ rm_cnd_df <- function(dat) { #' #' @seealso [ctl_new_rowid_pillar.cnd_df()]. #' +#' @return A character vector with header values of the conditioned data frame. +#' #' @examples #' df <- data.frame(x = c(1L, NA_integer_, 3L)) #' (cnd_df <- condition_add(dat = df, x >= 2L)) @@ -200,6 +202,8 @@ lgl_to_chr <- function(x) { #' @inheritParams pillar::ctl_new_rowid_pillar #' @importFrom pillar ctl_new_rowid_pillar #' +#' @return A character vector to print the tibble which is a conditioned dataframe. +#' #' @seealso [tbl_sum.cnd_df()]. #' #' @export @@ -340,6 +344,7 @@ condition_add <- function(dat, ..., .na = NA, .dat2 = rlang::env()) { #' #' @inheritParams dplyr::mutate #' @importFrom dplyr mutate +#' @return A conditioned data frame, meaning a tibble with mutated values. #' @export mutate.cnd_df <- function(.data, ..., diff --git a/R/ct.R b/R/ct.R index 09027149..06886c98 100644 --- a/R/ct.R +++ b/R/ct.R @@ -14,7 +14,6 @@ #' `"from"` or `"to"`. #' #' @keywords internal -#' @export ct_spec_vars <- function(set = c("all", "ct_clst", "from", "to")) { admiraldev::assert_character_vector(set) diff --git a/R/dtc_create_iso8601.R b/R/dtc_create_iso8601.R index 6ab2a8df..37195b88 100644 --- a/R/dtc_create_iso8601.R +++ b/R/dtc_create_iso8601.R @@ -241,6 +241,9 @@ format_iso8601 <- function(m, .cutoff_2000 = 68L) { #' interpretation of the formats. #' @param .warn Whether to warn about parsing failures. #' +#' @return A vector of dates, times or date-times in [ISO +#' 8601](https://en.wikipedia.org/wiki/ISO_8601) format +#' #' @examples #' # Converting dates #' create_iso8601(c("2020-01-01", "20200102"), .format = "y-m-d") diff --git a/R/pipe.R b/R/pipe.R index 33517d20..a98219fe 100644 --- a/R/pipe.R +++ b/R/pipe.R @@ -47,6 +47,8 @@ #' the dot placeholder, even when piping to the first argument of the #' right-hand side (`rhs`). #' +#' @return No Return Value. +#' #' @examples #' #' # Equivalent to `subset(head(iris), 1:nrow(head(iris)) %% 2 == 0)` diff --git a/README.md b/README.md index fda5873a..58c78c6c 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,7 @@ status](https://www.r-pkg.org/badges/version/sdtm.oak)](https://CRAN.R-project.org/package=sdtm.oak) -An EDC and Data Standard agnostic solution that enables the -pharmaceutical programming community to develop SDTM datasets in R. The -reusable algorithms concept in `{sdtm.oak}` provides a framework for -modular programming and also can automate SDTM creation based on the -standard SDTM spec. +An EDC (Electronic Data Capture systems) and Data Standard agnostic solution that enables the pharmaceutical programming community to develop CDISC (Clinical Data Interchange Standards Consortium) SDTM (Study Data Tabulation Model) datasets in R. The reusable algorithms concept in 'sdtm.oak' provides a framework for modular programming and also can automate SDTM creation based on the standard SDTM spec. ## Installation @@ -23,7 +19,7 @@ The package is available from CRAN and can be installed with: install.packages("sdtm.oak") ``` -You can install the development version of `{sdtm.oak}` from +You can install the development version of 'sdtm.oak' from [GitHub](https://github.com/pharmaverse/sdtm.oak/) with: ``` r @@ -36,9 +32,7 @@ remotes::install_github("pharmaverse/sdtm.oak") - Raw Data Structure: Data from different EDC systems come in varying structures, with different variable names, dataset names, etc. -- Varying Data Collection Standards: Despite the availability of CDASH, - pharmaceutical companies still create different eCRFs using CDASH - standards. +- Varying Data Collection Standards: Despite the availability of CDASH (Clinical Data Acquisition Standards Harmonization), pharmaceutical companies still create different eCRFs using CDASH standards. Due to the differences in raw data structures and data collection standards, it may seem impossible to develop a common approach for @@ -46,7 +40,7 @@ programming SDTM datasets. ## GOAL -`{sdtm.oak}` aims to address this issue by providing an EDC-agnostic, +'sdtm.oak' aims to address this issue by providing an EDC-agnostic, standards-agnostic solution. It is an open-source R package that offers a framework for the modular programming of SDTM in R. With future releases; it will also strive to automate the creation of SDTM datasets @@ -55,7 +49,7 @@ specifications. ## Scope -Our goal is to use `{sdtm.oak}` to program most of the domains specified +Our goal is to use 'sdtm.oak' to program most of the domains specified in SDTMIG (Study Data Tabulation Model Implementation Guide: Human Clinical Trials) and SDTMIG-AP (Study Data Tabulation Model Implementation Guide: Associated Persons). This R package is based on @@ -64,9 +58,9 @@ carrying out the SDTM mappings for any domains listed in the CDISC SDTMIG and across different versions of SDTM IGs. The design of these functions allows users to specify a raw dataset and a variable name(s) as parameters, making it EDC (Electronic Data Capture) agnostic. As long -as the raw dataset and variable name(s) exist, `{sdtm.oak}` will execute +as the raw dataset and variable name(s) exist, 'sdtm.oak' will execute the SDTM mapping using the selected function. It’s important to note -that `{sdtm.oak}` may not handle sponsor-specific details related to +that 'sdtm.oak' may not handle sponsor-specific details related to managing metadata for LAB tests, unit conversions, and coding information, as many companies have unique business processes. With subsequent releases, strive to automate SDTM creation using a @@ -74,9 +68,9 @@ metadata-driven approach based on a standard SDTM specification format. ## Road Map -This Release: The V0.1.0 release of `{sdtm.oak}` users can create the +This Release: The V0.1.0 release of 'sdtm.oak' users can create the majority of the SDTM domains. Domains that are NOT in scope for the -V0.1.0 release are DM, Trial Design Domains, SV, SE, RELREC, Associated +V0.1.0 release are DM (Demographics), Trial Design Domains, SV (Subject Visits), SE (Subject Elements), RELREC (Related Records), Associated Person domains, and EPOCH Variable across all domains. Subsequent Releases: We are planning to develop the below features in @@ -106,7 +100,7 @@ specification. ## Feedback -We ask users to follow the mentioned approach and try `{sdtm.oak}` to +We ask users to follow the mentioned approach and try 'sdtm.oak' to map any SDTM domains supported in this release. Users can also utilize the test data in the package to become familiar with the concepts before attempting on their own data. Please get in touch with us using one of @@ -118,7 +112,7 @@ the recommended approaches listed below: ## Acknowledgments We thank the contributors and authors of the package. We also thank the -CDISC COSA for sponsoring the `{sdtm.oak}`. Additionally, we would like +CDISC COSA for sponsoring the 'sdtm.oak'. Additionally, we would like to sincerely thank the volunteers from Roche, Pfizer, GSK, Vertex, and Merck for their valuable input as integral members of the CDISC COSA - OAK leadership team. diff --git a/man/create_iso8601.Rd b/man/create_iso8601.Rd index b7a69c60..414b20c9 100644 --- a/man/create_iso8601.Rd +++ b/man/create_iso8601.Rd @@ -41,6 +41,9 @@ interpretation of the formats.} \item{.warn}{Whether to warn about parsing failures.} } +\value{ +A vector of dates, times or date-times in \href{https://en.wikipedia.org/wiki/ISO_8601}{ISO 8601} format +} \description{ \code{\link[=create_iso8601]{create_iso8601()}} converts vectors of dates, times or date-times to \href{https://en.wikipedia.org/wiki/ISO_8601}{ISO 8601} format. Learn more in \code{vignette("iso_8601")}. diff --git a/man/ctl_new_rowid_pillar.cnd_df.Rd b/man/ctl_new_rowid_pillar.cnd_df.Rd index eb469be6..59434c0e 100644 --- a/man/ctl_new_rowid_pillar.cnd_df.Rd +++ b/man/ctl_new_rowid_pillar.cnd_df.Rd @@ -15,6 +15,9 @@ \item{...}{These dots are for future extensions and must be empty.} } +\value{ +A character vector to print the tibble which is a conditioned dataframe. +} \description{ Conditioned tibble pillar print method } diff --git a/man/dot_pipe.Rd b/man/dot_pipe.Rd index 716b9fee..74db5fb2 100644 --- a/man/dot_pipe.Rd +++ b/man/dot_pipe.Rd @@ -12,6 +12,9 @@ lhs \%.>\% rhs \item{rhs}{A function call that utilizes the dot (\code{.}) placeholder to specify where \code{lhs} should be placed.} } +\value{ +No Return Value. +} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} diff --git a/man/mutate.cnd_df.Rd b/man/mutate.cnd_df.Rd index de6ec25a..f198cc61 100644 --- a/man/mutate.cnd_df.Rd +++ b/man/mutate.cnd_df.Rd @@ -49,6 +49,9 @@ variables and columns created by \code{...} are kept. \item{.after}{Control where new columns should appear, i.e. after which columns.} } +\value{ +A conditioned data frame, meaning a tibble with mutated values. +} \description{ \code{\link[=mutate.cnd_df]{mutate.cnd_df()}} is an S3 method to be dispatched by \link[dplyr:mutate]{mutate} generic on conditioned data frames. This function implements a conditional diff --git a/man/tbl_sum.cnd_df.Rd b/man/tbl_sum.cnd_df.Rd index ad009f66..a21154fe 100644 --- a/man/tbl_sum.cnd_df.Rd +++ b/man/tbl_sum.cnd_df.Rd @@ -11,6 +11,9 @@ \item{...}{Additional arguments passed to the default print method.} } +\value{ +A character vector with header values of the conditioned data frame. +} \description{ Conditioned tibble header print method. This S3 method adds an extra line in the header of a tibble that indicates the tibble is a conditioned tibble