From 8dea621d8b11c4f9e269917b2a0f24a3eff5afa4 Mon Sep 17 00:00:00 2001 From: "Glauss,Isabel (MED BDS) BIP-DE-B" Date: Thu, 25 Apr 2024 12:03:32 +0200 Subject: [PATCH 1/4] SCR: fix some typos and other minor changes --- DESCRIPTION | 6 +++--- NAMESPACE | 2 -- NEWS.md | 2 +- R/export_helpers.R | 9 ++++++++ R/helpers.R | 14 ++++++------ R/mock_listings.R | 2 +- R/mock_simple_listing.R | 2 +- R/mod_export_listings.R | 2 ++ R/mod_listings.R | 12 +++++------ README.md | 46 ++++++++++++++++++++-------------------- man/fill_default_vars.Rd | 2 +- man/listings_UI.Rd | 4 ++-- man/mock_listings_mm.Rd | 1 + man/mod_listings.Rd | 10 ++++----- vignettes/disp.Rmd | 12 +++++------ 15 files changed, 69 insertions(+), 57 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 64cf923..75bdeb0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,10 +10,10 @@ Authors@R: person('Luis', 'Morís Fernández', email = 'luis.moris.fernandez.ext@boehringer-ingelheim.com', role = c('aut')), person('Jessica', 'Knizia', email = 'jessica.knizia@boehringer-ingelheim.com', role = c('ctb')) ) -Description: DaVinci’s dv.listings module displays a data listing of different dataset domains in tabular form. +Description: DaVinci’s dv.listings package provides a modules to display different dataset domains as listings. Users can select the dataset to be shown, and specify which columns of the dataset should be displayed. The displayed columns can be sorted and filtered. - Moreover, the listing can be filtered to show only entries containing a keyword entered by the user. + Moreover, the listing can be filtered to show only entries containing a keyword specified by the user. The module is not limited to usage of one data source, most notably, it can handle data from ADaM or SDTM. License: Apache License (>= 2) Encoding: UTF-8 @@ -41,7 +41,7 @@ Imports: shinyWidgets (>= 0.8.0), tibble (>= 3.2.1), dv.manager (>= 2.0.0-17) -RoxygenNote: 7.3.0 +RoxygenNote: 7.3.1 Roxygen: list(markdown = TRUE) Remotes: boehringer-ingelheim/dv.manager@main VignetteBuilder: knitr diff --git a/NAMESPACE b/NAMESPACE index 90287bb..cbcb544 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,8 +4,6 @@ export("%>%") export(convert_data) export(listings_UI) export(listings_server) -export(mock_listings_mm) -export(mock_simple_listing_mm) export(mod_listings) import(shiny) importFrom(magrittr,"%>%") diff --git a/NEWS.md b/NEWS.md index 9522275..a4c29a6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # dv.listings 3.1.0 -package was renamed to dv.listings +Package was renamed to dv.listings. # dv.table 3.0.1 diff --git a/R/export_helpers.R b/R/export_helpers.R index 7be341e..80f5838 100644 --- a/R/export_helpers.R +++ b/R/export_helpers.R @@ -20,6 +20,7 @@ PDF_EXP <- pack_of_constants( # nolint #' @return A shiny tagList. #' #' @keywords internal +#' export_modal_content <- function(ns, file_name, cond, colnames, activate_checkbox = FALSE) { # Check validity of parameters checkmate::assert( @@ -113,6 +114,7 @@ export_modal_content <- function(ns, file_name, cond, colnames, activate_checkbo #' @return A character vector containing the shortened strings in case they exceeded the maximal length. #' #' @keywords internal +#' shorten_entries <- function(vec, len_max) { # Check validity of parameters checkmate::assert( @@ -143,6 +145,7 @@ shorten_entries <- function(vec, len_max) { #' @return A list containing the `label_vec` which includes the splitted label and the actual width `col_width`. #' #' @keywords internal +#' split_label <- function(label, min_width, max_width, label_width) { # Check validity of parameters checkmate::assert( @@ -212,6 +215,7 @@ split_label <- function(label, min_width, max_width, label_width) { #' and a logical indicating whether the reference columns specification is valid (`check_ref_cols`). #' #' @keywords internal +#' calculate_col_width <- function(df, ref) { # Check validity of parameters checkmate::assert( @@ -278,6 +282,7 @@ calculate_col_width <- function(df, ref) { #' @return Named list containing a list of data frames (`list_of_df`) whose entries fit on one PDF page each. #' #' @keywords internal +#' pdf_preprocessing <- function(df, ref) { # Check validity of parameters checkmate::assert( @@ -406,6 +411,7 @@ pdf_preprocessing <- function(df, ref) { #' @return Named list containing the data frames which are now ready for download. #' #' @keywords internal +#' prep_export_data <- function(data_selection, current_data, data_selection_name, dataset_list) { # check validity of parameters checkmate::assert( @@ -449,6 +455,7 @@ prep_export_data <- function(data_selection, current_data, data_selection_name, #' @param file `[character(1)]` A string specifying the filename with ending ".xlsx". #' #' @keywords internal +#' excel_export <- function(data_to_download, file, intended_use_label) { # Check validity of parameters checkmate::assert( @@ -490,6 +497,7 @@ excel_export <- function(data_to_download, file, intended_use_label) { #' @return Number of PDF pages that are generated. #' #' @keywords internal +#' pdf_export <- function(data_to_download, ref_cols, file, metadata, active_session = TRUE, intended_use_label) { # Check validity of parameters checkmate::assert( @@ -546,6 +554,7 @@ pdf_export <- function(data_to_download, ref_cols, file, metadata, active_sessio #' @param text `[character(1)]` A string containing the warning message to be displayed. #' #' @keywords internal +#' warn_function <- function(cond, input_id, text) { # Check validity of parameters checkmate::assert( diff --git a/R/helpers.R b/R/helpers.R index 2962f44..c3e3787 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -8,8 +8,7 @@ #' "No label" for missing labels. #' #' @keywords internal -#' - +#' get_labels <- function(dataset) { # Catch special cases (e.g. when global filter returns empty dataset) return_null <- any(length(dataset) == 0, is.null(dataset)) @@ -55,7 +54,7 @@ get_labels <- function(dataset) { #' @return Character vector of the type ` [