diff --git a/NEWS.md b/NEWS.md index b9150eeb6c..9df1fe14ff 100644 --- a/NEWS.md +++ b/NEWS.md @@ -30,6 +30,8 @@ ## Documentation +- A way to standardize roxygen labels and descriptions for function arguments was implemented and tested (#2034) + ## Various # admiral 0.12.2 diff --git a/R/call_derivation.R b/R/call_derivation.R index 6afa0c5b80..38ad64629c 100644 --- a/R/call_derivation.R +++ b/R/call_derivation.R @@ -3,7 +3,7 @@ #' Call a single derivation multiple times with some parameters/arguments being fixed across #' iterations and others varying. #' -#' @param dataset The input dataset +#' @param dataset `r roxygen_param_dataset()` #' @param derivation The derivation function to call #' #' A function that performs a specific derivation is expected. A derivation diff --git a/R/create_single_dose_dataset.R b/R/create_single_dose_dataset.R index 1a0c782b24..936593cea0 100644 --- a/R/create_single_dose_dataset.R +++ b/R/create_single_dose_dataset.R @@ -185,10 +185,8 @@ dose_freq_lookup <- tribble( #' necessary when e.g. calculating last dose before an adverse event in `ADAE` #' or deriving a total dose parameter in `ADEX` when `EXDOSFRQ != ONCE`. #' -#' @param dataset Input dataset -#' -#' The columns specified by `dose_freq`, `start_date` and the `end_date` -#' parameters are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("dose_freq", "start_date", "end_date"))` #' #' @param dose_freq The dose frequency #' diff --git a/R/derive_adeg_params.R b/R/derive_adeg_params.R index 05ae271421..5c8afc3a80 100644 --- a/R/derive_adeg_params.R +++ b/R/derive_adeg_params.R @@ -6,10 +6,9 @@ #' #' **Note:** This is a wrapper function for the more generic `derive_param_computed()`. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` and the `unit_var` parameter, -#' `PARAMCD`, and `AVAL` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "get_unit_expr"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` @@ -257,10 +256,9 @@ compute_qtc <- function(qt, rr, method) { #' The analysis value of the new parameter is derived as #' \deqn{\frac{60000}{HR}}{60000 / HR} #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter, `PARAMCD`, and `AVAL` -#' are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` diff --git a/R/derive_advs_params.R b/R/derive_advs_params.R index 881db1b92f..06e646a90a 100644 --- a/R/derive_advs_params.R +++ b/R/derive_advs_params.R @@ -5,10 +5,9 @@ #' #' **Note:** This is a wrapper function for the more generic `derive_param_computed()`. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter, `PARAMCD`, and -#' `AVAL` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` @@ -226,10 +225,9 @@ compute_map <- function(diabp, sysbp, hr = NULL) { #' #' **Note:** This is a wrapper function for the more generic `derive_param_computed()`. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter, `PARAMCD`, and -#' `AVAL` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` @@ -549,10 +547,9 @@ compute_bsa <- function(height = height, #' #' **Note:** This is a wrapper function for the more generic `derive_param_computed()`. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter, `PARAMCD`, and -#' `AVAL` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` diff --git a/R/derive_basetype_records.R b/R/derive_basetype_records.R index ef81d4cab4..c1b4cf85b9 100644 --- a/R/derive_basetype_records.R +++ b/R/derive_basetype_records.R @@ -12,9 +12,8 @@ #' Adds the `BASETYPE` variable to a dataset and duplicates records based upon #' the provided conditions. #' -#' @param dataset Input dataset -#' -#' The columns specified in the expressions inside `basetypes` are required. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("basetypes"))` #' #' @param basetypes A *named* list of expressions created using the #' `rlang::exprs()` function diff --git a/R/derive_date_vars.R b/R/derive_date_vars.R index fd59df5145..1c65d29c44 100644 --- a/R/derive_date_vars.R +++ b/R/derive_date_vars.R @@ -1252,9 +1252,8 @@ compute_tmf <- function(dtc, #' impute, we only enable to impute up to a highest level, i.e. you couldn't #' choose to say impute months, but not days. #' -#' @param dataset Input dataset. -#' -#' The date character vector (`dtc`) must be present. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("dtc"))` #' #' @param new_vars_prefix Prefix used for the output variable(s). #' @@ -1461,9 +1460,8 @@ derive_vars_dt <- function(dataset, # nolint: cyclocomp_linter #' impute, we only enable to impute up to a highest level, i.e. you couldn't #' choose to say impute months, but not days. #' -#' @param dataset Input dataset -#' -#' The date character vector (`dtc`) must be present. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("dtc"))` #' #' @param new_vars_prefix Prefix used for the output variable(s). #' diff --git a/R/derive_expected_records.R b/R/derive_expected_records.R index d7ba0e61e3..1369267729 100644 --- a/R/derive_expected_records.R +++ b/R/derive_expected_records.R @@ -3,10 +3,8 @@ #' Add expected records as new observations for each 'by group' when the dataset #' contains missing observations. #' -#' @param dataset Input dataset -#' -#' A data frame, the columns from `dataset_ref` and specified by the -#' `by_vars` parameter are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("dataset_ref", "by_vars"))` #' #' @param dataset_expected_obs *Deprecated*, please use `dataset_ref` instead. #' diff --git a/R/derive_extreme_records.R b/R/derive_extreme_records.R index f8a0c64ce1..981e3d96ea 100644 --- a/R/derive_extreme_records.R +++ b/R/derive_extreme_records.R @@ -7,7 +7,7 @@ #' distinguishes `derive_extreme_records()` from `derive_summary_records()`, #' where only the by variables are populated for the new records. #' -#' @param dataset Input dataset +#' @param dataset `r roxygen_param_dataset()` #' #' If `dataset_add` is not specified, the new records are selected from the #' input dataset. In this case the variables specified by `by_vars` and @@ -92,6 +92,14 @@ #' automatically. #' #' +#' @param keep_source_vars Variables to be kept in the new records +#' +#' A named list or tidyselect expressions created by `exprs()` defining the +#' variables to be kept for the new records. The variables specified for +#' `by_vars` and `set_values_to` need not be specified here as they are kept +#' automatically. +#' +#' #' @inheritParams filter_extreme #' @inheritParams derive_summary_records #' diff --git a/R/derive_joined.R b/R/derive_joined.R index 1e0f5cff48..586f256360 100644 --- a/R/derive_joined.R +++ b/R/derive_joined.R @@ -6,9 +6,8 @@ #' variables from both datasets. For example, add the lowest value (nadir) #' before the current observation. #' -#' @param dataset Input dataset -#' -#' The variables specified by `by_vars` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param dataset_add Additional dataset #' diff --git a/R/derive_locf_records.R b/R/derive_locf_records.R index 89f05f502f..55339fb16c 100644 --- a/R/derive_locf_records.R +++ b/R/derive_locf_records.R @@ -3,10 +3,8 @@ #' Adds LOCF records as new observations for each 'by group' when the dataset #' does not contain observations for missed visits/time points. #' -#' @param dataset Input dataset -#' -#' The columns specified by the `by_vars`, `analysis_var`, `order`, -#' `keep_vars` parameters are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "analysis_var", "order", "keep_vars"))` #' #' @param dataset_expected_obs *Deprecated*, please use `dataset_ref` instead. #' diff --git a/R/derive_merged.R b/R/derive_merged.R index ea5b36a5d5..c93b158226 100644 --- a/R/derive_merged.R +++ b/R/derive_merged.R @@ -6,9 +6,8 @@ #' (`filter_add` argument) and/or selecting the first or last observation for #' each by group (`order` and `mode` argument). #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` argument are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param dataset_add Additional dataset #' @@ -710,9 +709,8 @@ get_not_mapped <- function() { #' #' **Note:** This is a wrapper function for the more generic `derive_vars_merged`. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` argument are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param dataset_add Additional dataset #' diff --git a/R/derive_param_computed.R b/R/derive_param_computed.R index ff48bcbe1c..4a9f1b1600 100644 --- a/R/derive_param_computed.R +++ b/R/derive_param_computed.R @@ -7,9 +7,9 @@ #' blood pressure (DIABP) with the formula #' \deqn{MAP = \frac{SYSBP + 2 DIABP}{3}}{MAP = (SYSBP + 2 DIABP) / 3} #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD` is expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` @@ -428,7 +428,8 @@ assert_parameters_argument <- function(parameters, optional = TRUE) { #' The function creates temporary parameters and variables of the form #' `.`, e.g., `AVAL.WEIGHT`. #' -#' @param dataset Input dataset +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param by_vars By variables #' diff --git a/R/derive_param_doseint.R b/R/derive_param_doseint.R index 016af0088b..6a863e8891 100644 --- a/R/derive_param_doseint.R +++ b/R/derive_param_doseint.R @@ -8,10 +8,9 @@ #' The analysis value of the new parameter is derived as #' Total Dose / Planned Dose * 100 #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter, `PARAMCD`, and -#' `AVAL` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` diff --git a/R/derive_param_exist_flag.R b/R/derive_param_exist_flag.R index c3df01bad8..6ecad23db6 100644 --- a/R/derive_param_exist_flag.R +++ b/R/derive_param_exist_flag.R @@ -5,10 +5,9 @@ #' function can derive a parameter indicating if there is measurable disease at #' baseline. #' -#' @param dataset Input dataset -#' -#' The variables specified for `by_vars` and the `PARAMCD` variable are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD` is expected as well. #' #' @param dataset_ref Reference dataset, e.g., ADSL #' diff --git a/R/derive_param_exposure.R b/R/derive_param_exposure.R index 652e9d2992..89d7e30bc3 100644 --- a/R/derive_param_exposure.R +++ b/R/derive_param_exposure.R @@ -3,10 +3,9 @@ #' Add a record computed from the aggregated analysis value of another parameter and compute the #' start (`ASTDT(M)`)and end date (`AENDT(M)`) as the minimum and maximum date by `by_vars`. #' -#' @param dataset Input dataset -#' -#' + The variables specified by the `by_vars`,`analysis_var` parameters and `PARAMCD` are -#' expected, +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "analysis_var"))` +#' `PARAMCD` is expected as well, #' + Either `ASTDTM` and `AENDTM` or `ASTDT` and `AENDT` are also expected. #' #' @param filter Filter condition diff --git a/R/derive_param_extreme_record.R b/R/derive_param_extreme_record.R index d14753b984..e55431b7ea 100644 --- a/R/derive_param_extreme_record.R +++ b/R/derive_param_extreme_record.R @@ -4,7 +4,7 @@ #' source datasets, based on user-defined filter, order and by group criteria. #' All variables of the selected observation are kept. #' -#' @param dataset Input dataset +#' @param dataset `r roxygen_param_dataset()` #' #' @param sources Sources #' diff --git a/R/derive_param_framingham.R b/R/derive_param_framingham.R index 7f10bb234f..5186206151 100644 --- a/R/derive_param_framingham.R +++ b/R/derive_param_framingham.R @@ -4,10 +4,9 @@ #' Adds a record for framingham score (FCVD101) for each by group #' (e.g., subject and visit) where the source parameters are available. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter, `PARAMCD`, and -#' `AVAL` are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset after restricting it by the filter condition (`filter` diff --git a/R/derive_param_tte.R b/R/derive_param_tte.R index 9b5069813d..db870381d1 100644 --- a/R/derive_param_tte.R +++ b/R/derive_param_tte.R @@ -2,9 +2,8 @@ #' #' Add a time-to-event parameter to the input dataset. #' -#' @param dataset Input dataset -#' -#' The `PARAMCD` variable is expected. +#' @param dataset `r roxygen_param_dataset()` +#' `PARAMCD` is expected. #' #' @param dataset_adsl ADSL input dataset #' diff --git a/R/derive_param_wbc_abs.R b/R/derive_param_wbc_abs.R index 60ec791326..5dc7a1e79d 100644 --- a/R/derive_param_wbc_abs.R +++ b/R/derive_param_wbc_abs.R @@ -4,10 +4,9 @@ #' #' Add a parameter by converting lab differentials from fraction or percentage to absolute values #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` argument, `PARAMCD`, and `AVAL` -#' are expected to be present. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` +#' `PARAMCD`, and `AVAL` are expected as well. #' #' The variable specified by `by_vars` and `PARAMCD` must be a unique key of #' the input dataset, and to the parameters specified by `wbc_code` and `diff_code`. diff --git a/R/derive_summary_records.R b/R/derive_summary_records.R index 9418e0cafd..76e936b6b9 100644 --- a/R/derive_summary_records.R +++ b/R/derive_summary_records.R @@ -11,7 +11,7 @@ #' retain those common values in the newly derived records. Otherwise new value #' will be set to `NA`. #' -#' @param dataset A data frame. +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars", "analysis_var"))` #' #' @param by_vars Variables to consider for generation of groupwise summary #' records. Providing the names of variables in [exprs()] will create a diff --git a/R/derive_var_analysis_ratio.R b/R/derive_var_analysis_ratio.R index 98a35cce18..7a41ac6015 100644 --- a/R/derive_var_analysis_ratio.R +++ b/R/derive_var_analysis_ratio.R @@ -2,7 +2,8 @@ #' #' Derives a ratio variable for a BDS dataset based on user specified variables. #' -#' @param dataset Input dataset +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("numer_var", "denom_var"))` #' #' @param numer_var Variable containing numeric values to be used in the numerator of #' the ratio calculation. diff --git a/R/derive_var_anrind.R b/R/derive_var_anrind.R index 909e5b452c..ae37f01591 100644 --- a/R/derive_var_anrind.R +++ b/R/derive_var_anrind.R @@ -1,6 +1,10 @@ #' Derive Reference Range Indicator #' -#' @param dataset The input dataset +#' @param dataset +#' `r roxygen_param_dataset()` +#' `ANRLO`, `ANRHI`, and `AVAL` are expected and if `use_a1hia1lo` is set to `TRUE`, +#' `A1LO` and `A1H1` are expected as well. +#' #' @param use_a1hia1lo A logical value indicating whether to use `A1H1` and `A1LO` in #' the derivation of `ANRIND`. #' diff --git a/R/derive_var_atoxgr.R b/R/derive_var_atoxgr.R index 1addcf86f2..7cb8467250 100644 --- a/R/derive_var_atoxgr.R +++ b/R/derive_var_atoxgr.R @@ -3,9 +3,8 @@ #' @description #' Derives a character lab grade based on severity/toxicity criteria. #' -#' @param dataset Input data set -#' -#' The columns specified by `tox_description_var` parameter is expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("tox_description_var"))` #' #' @param new_var Name of the character grade variable to create, for example, `ATOXGRH` #' or `ATOXGRL`. @@ -246,10 +245,9 @@ derive_var_atoxgr_dir <- function(dataset, #' #' Derives character lab grade based on high and low severity/toxicity grade(s). #' -#' @param dataset Input data set -#' -#' The columns `ATOXGRL`, `ATOXGRH` and specified by `lotox_description_var`, -#' and `hitox_description_var` parameters are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("lotox_description_var", "hitox_description_var"))` +#' `ATOXGRL`, and `ATOXGRH` are expected as well. #' #' @param lotox_description_var Variable containing the toxicity grade description #' for low values, eg. "Anemia" diff --git a/R/derive_var_base.R b/R/derive_var_base.R index 5f88f582bf..af60e1d676 100644 --- a/R/derive_var_base.R +++ b/R/derive_var_base.R @@ -4,7 +4,7 @@ #' #' **Note:** This is a wrapper function for the more generic `derive_vars_merged()`. #' -#' @param dataset The input dataset +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars", "source_var"))` #' #' @param by_vars Grouping variables uniquely identifying a set #' of records for which to calculate `new_var` diff --git a/R/derive_var_chg.R b/R/derive_var_chg.R index 3a0ca93f03..0d913d4437 100644 --- a/R/derive_var_chg.R +++ b/R/derive_var_chg.R @@ -4,6 +4,8 @@ #' #' @param dataset The input dataset. Required variables are `AVAL` and #' `BASE`. +#' @param dataset +#' `r roxygen_param_dataset()` `AVAL` and `BASE` are expected. #' #' @details #' Change from baseline is calculated by subtracting the baseline value diff --git a/R/derive_var_dthcaus.R b/R/derive_var_dthcaus.R index 084182fa8d..f3f74631fb 100644 --- a/R/derive_var_dthcaus.R +++ b/R/derive_var_dthcaus.R @@ -2,9 +2,8 @@ #' #' Derive death cause (`DTHCAUS`) and add traceability variables if required. #' -#' @param dataset Input dataset. -#' -#' The variables specified by `subject_keys` are required. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("subject_keys"))` #' #' @param source_datasets A named `list` containing datasets in which to search for the #' death cause diff --git a/R/derive_var_extreme_date.R b/R/derive_var_extreme_date.R index f30e9e1c0b..c4611189c6 100644 --- a/R/derive_var_extreme_date.R +++ b/R/derive_var_extreme_date.R @@ -3,9 +3,8 @@ #' Add the first or last datetime from multiple sources to the dataset, e.g., #' the last known alive datetime (`LSTALVDTM`). #' -#' @param dataset Input dataset -#' -#' The variables specified by `subject_keys` are required. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("subject_keys"))` #' #' @param new_var Name of variable to create #' diff --git a/R/derive_var_extreme_flag.R b/R/derive_var_extreme_flag.R index 8cca038477..120e8e4e47 100644 --- a/R/derive_var_extreme_flag.R +++ b/R/derive_var_extreme_flag.R @@ -2,9 +2,8 @@ #' #' Add a variable flagging the first or last observation within each by group #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param order Sort order #' diff --git a/R/derive_var_joined_exist_flag.R b/R/derive_var_joined_exist_flag.R index fd61afa929..fece51a587 100644 --- a/R/derive_var_joined_exist_flag.R +++ b/R/derive_var_joined_exist_flag.R @@ -10,10 +10,8 @@ #' response value can be confirmed by an other assessment. This is commonly #' used in endpoints such as best overall response. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` and `join_vars` parameter are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "join_vars"))` #' #' @param by_vars By variables #' diff --git a/R/derive_var_obs_number.R b/R/derive_var_obs_number.R index ffa425263f..46bcbef97d 100644 --- a/R/derive_var_obs_number.R +++ b/R/derive_var_obs_number.R @@ -2,10 +2,8 @@ #' #' Adds a variable numbering the observations within each by group #' -#' @param dataset Input dataset -#' -#' The variables specified by the `order` and the `by_vars` parameter are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "order"))` #' #' @param by_vars Grouping variables #' diff --git a/R/derive_var_ontrtfl.R b/R/derive_var_ontrtfl.R index e3a6ddebb1..64eab8116b 100644 --- a/R/derive_var_ontrtfl.R +++ b/R/derive_var_ontrtfl.R @@ -4,7 +4,7 @@ #' assessment date (e.g `ADT`) or event start and end dates (e.g. #' `ASTDT`/`AENDT`). #' -#' @param dataset Input dataset. +#' @param dataset `r roxygen_param_dataset()` #' #' Required columns are `start_date`, `end_date`, `ref_start_date` and #' `ref_end_date`. diff --git a/R/derive_var_pchg.R b/R/derive_var_pchg.R index 035ab479f6..03ac7e8c30 100644 --- a/R/derive_var_pchg.R +++ b/R/derive_var_pchg.R @@ -2,8 +2,8 @@ #' #' Derive percent change from baseline (`PCHG`) in a BDS dataset #' -#' @param dataset The input dataset. Required variables are `AVAL` and -#' `BASE`. +#' @param dataset `r roxygen_param_dataset()` +#' `AVAL` and `BASE` are expected. #' #' @details #' Percent change from baseline is calculated by dividing change from diff --git a/R/derive_var_relative_flag.R b/R/derive_var_relative_flag.R index 42883f1c45..a2295d85ce 100644 --- a/R/derive_var_relative_flag.R +++ b/R/derive_var_relative_flag.R @@ -5,10 +5,8 @@ #' called to flag for each subject all observations before the first disease #' progression or to flag all AEs after a specific AE. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `order` and the `by_vars` argument are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "order"))` #' #' @param by_vars Grouping variables #' diff --git a/R/derive_var_shift.R b/R/derive_var_shift.R index f02600bbb6..38dfe85e8d 100644 --- a/R/derive_var_shift.R +++ b/R/derive_var_shift.R @@ -4,9 +4,8 @@ #' values based on user-defined pairing, e.g., shift from baseline to #' analysis value, shift from baseline grade to analysis grade, ... #' -#' @param dataset Input dataset -#' -#' The columns specified by `from_var` and the `to_var` parameters are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("from_var", "to_var"))` #' #' @param new_var Name of the character shift variable to create. #' diff --git a/R/derive_var_trtdurd.R b/R/derive_var_trtdurd.R index d2e3e46042..88c36c0c00 100644 --- a/R/derive_var_trtdurd.R +++ b/R/derive_var_trtdurd.R @@ -4,10 +4,8 @@ #' #' **Note:** This is a wrapper function for the more generic `derive_vars_duration()`. #' -#' @param dataset Input dataset -#' -#' The columns specified by the `start_date` and the `end_date` parameter are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("start_date", "end_date"))` #' #' @param start_date The start date #' diff --git a/R/derive_var_trtemfl.R b/R/derive_var_trtemfl.R index dc88db41db..ef09e50296 100644 --- a/R/derive_var_trtemfl.R +++ b/R/derive_var_trtemfl.R @@ -2,7 +2,7 @@ #' #' Derive treatment emergent analysis flag (e.g., `TRTEMFL`). #' -#' @param dataset Input dataset +#' @param dataset `r roxygen_param_dataset()` #' #' The variables specified by `start_date`, `end_date`, `trt_start_date`, #' `trt_end_date`, `initial_intensity`, and `intensity` are expected. diff --git a/R/derive_vars_aage.R b/R/derive_vars_aage.R index 8e4afc3e31..18ad0c95f8 100644 --- a/R/derive_vars_aage.R +++ b/R/derive_vars_aage.R @@ -6,10 +6,8 @@ #' #' @inheritParams derive_vars_duration #' -#' @param dataset Input dataset -#' -#' The columns specified by the `start_date` and the `end_date` parameter are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("start_date", "end_date"))` #' #' @param start_date The start date #' @@ -120,9 +118,8 @@ derive_vars_aage <- function(dataset, #' units given in the `age_var+U` variable or `age_unit` argument and stores #' in a new variable (`new_var`). #' -#' @param dataset Input dataset. -#' -#' The column specified by the `age_var` argument is expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("age_var"))` #' #' @param age_var Age variable. #' diff --git a/R/derive_vars_dtm_to_dt.R b/R/derive_vars_dtm_to_dt.R index 7b1a74078d..a073a62adf 100644 --- a/R/derive_vars_dtm_to_dt.R +++ b/R/derive_vars_dtm_to_dt.R @@ -2,7 +2,8 @@ #' #' This function creates date(s) as output from datetime variable(s) #' -#' @param dataset Input dataset +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("source_vars"))` #' #' @param source_vars A list of datetime variables created using `exprs()` from #' which dates are to be extracted diff --git a/R/derive_vars_dtm_to_tm.R b/R/derive_vars_dtm_to_tm.R index 5a094b2fd1..8a4d64520b 100644 --- a/R/derive_vars_dtm_to_tm.R +++ b/R/derive_vars_dtm_to_tm.R @@ -2,7 +2,8 @@ #' #' This function creates time variable(s) as output from datetime variable(s) #' -#' @param dataset Input dataset +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("source_vars"))` #' #' @param source_vars A list of datetime variables created using `exprs()` from #' which time is to be extracted diff --git a/R/derive_vars_duration.R b/R/derive_vars_duration.R index 2b46e4b6ae..3734b84cd4 100644 --- a/R/derive_vars_duration.R +++ b/R/derive_vars_duration.R @@ -3,10 +3,8 @@ #' Derives duration between two dates, specified by the variables present in #' input dataset e.g., duration of adverse events, relative day, age, ... #' -#' @param dataset Input dataset -#' -#' The variables specified by the `start_date` and the `end_date` parameter are -#' expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("start_date", "end_date"))` #' #' @param new_var Name of variable to create #' diff --git a/R/derive_vars_dy.R b/R/derive_vars_dy.R index e6d2d515f3..82de671881 100644 --- a/R/derive_vars_dy.R +++ b/R/derive_vars_dy.R @@ -3,10 +3,8 @@ #' Adds relative day variables (`--DY`) to the dataset, e.g., `ASTDY` and #' `AENDY`. #' -#' @param dataset Input dataset -#' -#' The columns specified by the `reference_date` and the `source_vars` -#' parameter are expected. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("reference_date", "source_vars"))` #' #' @param reference_date A date or date-time column, e.g., date of first treatment #' or date-time of last exposure to treatment. diff --git a/R/derive_vars_query.R b/R/derive_vars_query.R index 6604ccf9bd..ca9025f8d3 100644 --- a/R/derive_vars_query.R +++ b/R/derive_vars_query.R @@ -26,7 +26,7 @@ #' `GRPID`, `SCOPE`, and `SCOPEN` respectively, #' whenever not missing. #' -#' @param dataset Input dataset. +#' @param dataset `r roxygen_param_dataset()` #' #' @param dataset_queries A dataset containing required columns `PREFIX`, #' `GRPNAME`, `SRCVAR`, `TERMNAME`, `TERMID`, and optional columns diff --git a/R/derive_vars_transposed.R b/R/derive_vars_transposed.R index 1ae95521b7..d91e32d2cf 100644 --- a/R/derive_vars_transposed.R +++ b/R/derive_vars_transposed.R @@ -2,9 +2,8 @@ #' #' Adds variables from a vertical dataset after transposing it into a wide one. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter are required +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param dataset_merge Dataset to transpose and merge #' @@ -102,9 +101,8 @@ derive_vars_transposed <- function(dataset, #' #' **Note:** This is a wrapper function for the more generic `derive_vars_transposed()`. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `by_vars` parameter are required +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param dataset_facm FACM dataset #' diff --git a/R/duplicates.R b/R/duplicates.R index 43a48e9feb..f4520d84fa 100644 --- a/R/duplicates.R +++ b/R/duplicates.R @@ -35,7 +35,7 @@ get_duplicates_dataset <- function() { #' Extract Duplicate Records #' -#' @param dataset A data frame +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' @param by_vars A list of expressions created using `exprs()` identifying #' groups of records in which to look for duplicates #' @@ -78,7 +78,7 @@ extract_duplicate_records <- function(dataset, by_vars) { #' Signal Duplicate Records #' -#' @param dataset A data frame +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' @param by_vars A list of expressions created using `exprs()` identifying #' groups of records in which to look for duplicates #' @param msg The condition message diff --git a/R/filter_exist.R b/R/filter_exist.R index b842b02a2a..17de6f306e 100644 --- a/R/filter_exist.R +++ b/R/filter_exist.R @@ -5,9 +5,7 @@ #' this could be used to return ADSL records for subjects that experienced a certain #' adverse event during the course of the study (as per records in ADAE). #' -#' @param dataset Input dataset -#' -#' The variables specified in the `by_vars` parameter are expected in this dataset. +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars"))` #' #' @param dataset_add Source dataset #' diff --git a/R/filter_extreme.R b/R/filter_extreme.R index 8dab991b4f..c08a60646e 100644 --- a/R/filter_extreme.R +++ b/R/filter_extreme.R @@ -2,10 +2,7 @@ #' #' Filters the first or last observation for each by group. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `order` and the `by_vars` parameter are -#' expected. +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars", "order"))` #' #' @param by_vars Grouping variables #' diff --git a/R/filter_joined.R b/R/filter_joined.R index 1d85e6cfdb..d39e4d1ceb 100644 --- a/R/filter_joined.R +++ b/R/filter_joined.R @@ -16,10 +16,7 @@ #' response value can be confirmed by a subsequent assessment. This is commonly #' used in endpoints such as best overall response. #' -#' @param dataset Input dataset -#' -#' The variables specified for `by_vars`, `join_vars`, and `order` are -#' expected. +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars", "order", "join_vars"))` #' #' @param by_vars By variables #' diff --git a/R/filter_relative.R b/R/filter_relative.R index 34c57d796b..aa38420db8 100644 --- a/R/filter_relative.R +++ b/R/filter_relative.R @@ -5,10 +5,7 @@ #' called to select for each subject all observations before the first disease #' progression. #' -#' @param dataset Input dataset -#' -#' The variables specified by the `order` and the `by_vars` parameter are -#' expected. +#' @param dataset `r roxygen_param_dataset(expected_vars = c("by_vars", "order"))` #' #' @param by_vars Grouping variables #' diff --git a/R/get_summary_records.R b/R/get_summary_records.R index bc32316034..9de71fcd98 100644 --- a/R/get_summary_records.R +++ b/R/get_summary_records.R @@ -18,7 +18,8 @@ #' to the original dataset observations. If you would like to this instead, #' see the `derive_summary_records()` function. #' -#' @param dataset A data frame. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("by_vars", "analysis_var"))` #' #' @param by_vars Variables to consider for generation of groupwise summary #' records. Providing the names of variables in [exprs()] will create a diff --git a/R/period_dataset.R b/R/period_dataset.R index f16998e8ab..a57b330cf1 100644 --- a/R/period_dataset.R +++ b/R/period_dataset.R @@ -6,11 +6,10 @@ #' `APERIOD`, `APERSDT`, `APEREDT`, `TRTA`, `APHASEN`, `PHSDTM`, `PHEDTM`, ... #' in OCCDS and BDS datasets. #' -#' @param dataset ADSL dataset -#' -#' The variables specified by `new_vars` and `subject_keys` are expected. For -#' each element of `new_vars` at least one variable of the form of the right -#' hand side value must be available in the dataset. +#' @param dataset +#' `r roxygen_param_dataset(expected_vars = c("new_vars", "subject_keys"))` +#' For each element of `new_vars` at least one variable of the form of the right +#' hand side value must be available in the dataset. #' #' @param new_vars New variables #' @@ -232,9 +231,7 @@ create_period_dataset <- function(dataset, #' reference dataset which has one observations per patient and subperiod, #' period, or phase. #' -#' @param dataset ADSL dataset -#' -#' The variables specified by `subject_keys` are expected. +#' @param dataset `r roxygen_param_dataset(expected_vars = c("subject_keys"))` #' #' @param dataset_ref Period reference dataset #' diff --git a/R/restrict_derivation.R b/R/restrict_derivation.R index 7a5605e7b4..ac0d6d5657 100644 --- a/R/restrict_derivation.R +++ b/R/restrict_derivation.R @@ -2,7 +2,7 @@ #' #' Execute a derivation on a subset of the input dataset. #' -#' @param dataset Input dataset +#' @param dataset `r roxygen_param_dataset()` #' #' @param derivation Derivation #' diff --git a/R/roxygen2.R b/R/roxygen2.R new file mode 100644 index 0000000000..f37a44b158 --- /dev/null +++ b/R/roxygen2.R @@ -0,0 +1,16 @@ +# THIS FILE INCLUDES FUNCTION THAT ARE RE-USED THROUGHOUT +# roxygen2 COMMENTS TO GENERATE DOCUMENTATION TEXT + +roxygen_param_dataset <- function(expected_vars = NULL) { + if (is.null(expected_vars)) { + dataset_text <- "Input dataset" + } else { + dataset_text <- paste0( + "Input dataset \n \n", + "The variables specified by the ", + enumerate(expected_vars), + " argument(s) to be expected." + ) + } + return(dataset_text) +} diff --git a/R/slice_derivation.R b/R/slice_derivation.R index 2a4eb39056..c0c4a94ab7 100644 --- a/R/slice_derivation.R +++ b/R/slice_derivation.R @@ -4,7 +4,7 @@ #' derivation is called separately. Some or all arguments of the derivation #' may vary depending on the slice. #' -#' @param dataset Input dataset +#' @param dataset `r roxygen_param_dataset()` #' #' @param derivation Derivation #' diff --git a/man/call_derivation.Rd b/man/call_derivation.Rd index 313cef60c5..79c795f5e9 100644 --- a/man/call_derivation.Rd +++ b/man/call_derivation.Rd @@ -7,7 +7,7 @@ call_derivation(dataset = NULL, derivation, variable_params, ...) } \arguments{ -\item{dataset}{The input dataset} +\item{dataset}{Input dataset} \item{derivation}{The derivation function to call diff --git a/man/create_period_dataset.Rd b/man/create_period_dataset.Rd index 8a6f99bf3f..64086f3002 100644 --- a/man/create_period_dataset.Rd +++ b/man/create_period_dataset.Rd @@ -11,10 +11,10 @@ create_period_dataset( ) } \arguments{ -\item{dataset}{ADSL dataset +\item{dataset}{Input dataset -The variables specified by \code{new_vars} and \code{subject_keys} are expected. For -each element of \code{new_vars} at least one variable of the form of the right +The variables specified by the \code{new_vars} and \code{subject_keys} argument(s) to be expected. +For each element of \code{new_vars} at least one variable of the form of the right hand side value must be available in the dataset.} \item{new_vars}{New variables diff --git a/man/create_single_dose_dataset.Rd b/man/create_single_dose_dataset.Rd index fc4e10c82d..70d314fd0d 100644 --- a/man/create_single_dose_dataset.Rd +++ b/man/create_single_dose_dataset.Rd @@ -21,8 +21,7 @@ create_single_dose_dataset( \arguments{ \item{dataset}{Input dataset -The columns specified by \code{dose_freq}, \code{start_date} and the \code{end_date} -parameters are expected.} +The variables specified by the \code{dose_freq}, \code{start_date} and \code{end_date} argument(s) to be expected.} \item{dose_freq}{The dose frequency diff --git a/man/derive_basetype_records.Rd b/man/derive_basetype_records.Rd index 44b88473c3..1bc0d42fa1 100644 --- a/man/derive_basetype_records.Rd +++ b/man/derive_basetype_records.Rd @@ -9,7 +9,7 @@ derive_basetype_records(dataset, basetypes) \arguments{ \item{dataset}{Input dataset -The columns specified in the expressions inside \code{basetypes} are required.} +The variables specified by the \code{basetypes} argument(s) to be expected.} \item{basetypes}{A \emph{named} list of expressions created using the \code{rlang::exprs()} function diff --git a/man/derive_expected_records.Rd b/man/derive_expected_records.Rd index 146b48ff60..43bbe10b66 100644 --- a/man/derive_expected_records.Rd +++ b/man/derive_expected_records.Rd @@ -15,8 +15,7 @@ derive_expected_records( \arguments{ \item{dataset}{Input dataset -A data frame, the columns from \code{dataset_ref} and specified by the -\code{by_vars} parameter are expected.} +The variables specified by the \code{dataset_ref} and \code{by_vars} argument(s) to be expected.} \item{dataset_expected_obs}{\emph{Deprecated}, please use \code{dataset_ref} instead.} diff --git a/man/derive_extreme_event.Rd b/man/derive_extreme_event.Rd index 21b4e90564..4e6b58af41 100644 --- a/man/derive_extreme_event.Rd +++ b/man/derive_extreme_event.Rd @@ -20,8 +20,7 @@ derive_extreme_event( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{order} and the \code{by_vars} parameter are -expected.} +The variables specified by the \code{by_vars} and \code{order} argument(s) to be expected.} \item{by_vars}{Grouping variables diff --git a/man/derive_locf_records.Rd b/man/derive_locf_records.Rd index 5f500aaf0b..dc8cb92d95 100644 --- a/man/derive_locf_records.Rd +++ b/man/derive_locf_records.Rd @@ -17,8 +17,7 @@ derive_locf_records( \arguments{ \item{dataset}{Input dataset -The columns specified by the \code{by_vars}, \code{analysis_var}, \code{order}, -\code{keep_vars} parameters are expected.} +The variables specified by the \code{by_vars}, \code{analysis_var}, \code{order} and \code{keep_vars} argument(s) to be expected.} \item{dataset_expected_obs}{\emph{Deprecated}, please use \code{dataset_ref} instead.} diff --git a/man/derive_param_bmi.Rd b/man/derive_param_bmi.Rd index 5674f1007c..ecca7410dc 100644 --- a/man/derive_param_bmi.Rd +++ b/man/derive_param_bmi.Rd @@ -18,8 +18,8 @@ derive_param_bmi( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter, \code{PARAMCD}, and -\code{AVAL} are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_bsa.Rd b/man/derive_param_bsa.Rd index 6295555c54..78a98814e6 100644 --- a/man/derive_param_bsa.Rd +++ b/man/derive_param_bsa.Rd @@ -19,8 +19,8 @@ derive_param_bsa( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter, \code{PARAMCD}, and -\code{AVAL} are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_computed.Rd b/man/derive_param_computed.Rd index 12cdf77ec6..88002805cb 100644 --- a/man/derive_param_computed.Rd +++ b/man/derive_param_computed.Rd @@ -21,7 +21,8 @@ derive_param_computed( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD} is expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_doseint.Rd b/man/derive_param_doseint.Rd index f67b68afff..877ac7d3ad 100644 --- a/man/derive_param_doseint.Rd +++ b/man/derive_param_doseint.Rd @@ -17,8 +17,8 @@ derive_param_doseint( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter, \code{PARAMCD}, and -\code{AVAL} are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_exist_flag.Rd b/man/derive_param_exist_flag.Rd index 7431e6308d..f56fdbb032 100644 --- a/man/derive_param_exist_flag.Rd +++ b/man/derive_param_exist_flag.Rd @@ -20,8 +20,8 @@ derive_param_exist_flag( \arguments{ \item{dataset}{Input dataset -The variables specified for \code{by_vars} and the \code{PARAMCD} variable are -expected.} +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD} is expected as well.} \item{dataset_ref}{Reference dataset, e.g., ADSL diff --git a/man/derive_param_exposure.Rd b/man/derive_param_exposure.Rd index 5f0d4fd0be..c946090150 100644 --- a/man/derive_param_exposure.Rd +++ b/man/derive_param_exposure.Rd @@ -16,9 +16,10 @@ derive_param_exposure( } \arguments{ \item{dataset}{Input dataset + +The variables specified by the \code{by_vars} and \code{analysis_var} argument(s) to be expected. +\code{PARAMCD} is expected as well, \itemize{ -\item The variables specified by the \code{by_vars},\code{analysis_var} parameters and \code{PARAMCD} are -expected, \item Either \code{ASTDTM} and \code{AENDTM} or \code{ASTDT} and \code{AENDT} are also expected. }} diff --git a/man/derive_param_framingham.Rd b/man/derive_param_framingham.Rd index 26a89ff1f7..8aec00eec6 100644 --- a/man/derive_param_framingham.Rd +++ b/man/derive_param_framingham.Rd @@ -24,8 +24,8 @@ derive_param_framingham( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter, \code{PARAMCD}, and -\code{AVAL} are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_map.Rd b/man/derive_param_map.Rd index 93b412d356..472e26bd56 100644 --- a/man/derive_param_map.Rd +++ b/man/derive_param_map.Rd @@ -18,8 +18,8 @@ derive_param_map( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter, \code{PARAMCD}, and -\code{AVAL} are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_qtc.Rd b/man/derive_param_qtc.Rd index 512945e8b0..594b7b1cd3 100644 --- a/man/derive_param_qtc.Rd +++ b/man/derive_param_qtc.Rd @@ -18,8 +18,8 @@ derive_param_qtc( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} and the \code{unit_var} parameter, -\code{PARAMCD}, and \code{AVAL} are expected. +The variables specified by the \code{by_vars} and \code{get_unit_expr} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_rr.Rd b/man/derive_param_rr.Rd index f6ba8b9add..ddf944a837 100644 --- a/man/derive_param_rr.Rd +++ b/man/derive_param_rr.Rd @@ -16,8 +16,8 @@ derive_param_rr( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter, \code{PARAMCD}, and \code{AVAL} -are expected. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset after restricting it by the filter condition (\code{filter} diff --git a/man/derive_param_tte.Rd b/man/derive_param_tte.Rd index 4177cbf61f..dc17c2b7f7 100644 --- a/man/derive_param_tte.Rd +++ b/man/derive_param_tte.Rd @@ -19,8 +19,7 @@ derive_param_tte( } \arguments{ \item{dataset}{Input dataset - -The \code{PARAMCD} variable is expected.} +\code{PARAMCD} is expected.} \item{dataset_adsl}{ADSL input dataset diff --git a/man/derive_param_wbc_abs.Rd b/man/derive_param_wbc_abs.Rd index e2278299b9..15c8555dc6 100644 --- a/man/derive_param_wbc_abs.Rd +++ b/man/derive_param_wbc_abs.Rd @@ -18,8 +18,8 @@ derive_param_wbc_abs( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} argument, \code{PARAMCD}, and \code{AVAL} -are expected to be present. +The variables specified by the \code{by_vars} argument(s) to be expected. +\code{PARAMCD}, and \code{AVAL} are expected as well. The variable specified by \code{by_vars} and \code{PARAMCD} must be a unique key of the input dataset, and to the parameters specified by \code{wbc_code} and \code{diff_code}.} diff --git a/man/derive_summary_records.Rd b/man/derive_summary_records.Rd index 05281d4767..6f4154e20a 100644 --- a/man/derive_summary_records.Rd +++ b/man/derive_summary_records.Rd @@ -14,7 +14,9 @@ derive_summary_records( ) } \arguments{ -\item{dataset}{A data frame.} +\item{dataset}{Input dataset + +The variables specified by the \code{by_vars} and \code{analysis_var} argument(s) to be expected.} \item{by_vars}{Variables to consider for generation of groupwise summary records. Providing the names of variables in \code{\link[=exprs]{exprs()}} will create a diff --git a/man/derive_var_age_years.Rd b/man/derive_var_age_years.Rd index cee141541c..2f0361f722 100644 --- a/man/derive_var_age_years.Rd +++ b/man/derive_var_age_years.Rd @@ -7,9 +7,9 @@ derive_var_age_years(dataset, age_var, age_unit = NULL, new_var) } \arguments{ -\item{dataset}{Input dataset. +\item{dataset}{Input dataset -The column specified by the \code{age_var} argument is expected.} +The variables specified by the \code{age_var} argument(s) to be expected.} \item{age_var}{Age variable. diff --git a/man/derive_var_analysis_ratio.Rd b/man/derive_var_analysis_ratio.Rd index 6272963e46..d7b3059558 100644 --- a/man/derive_var_analysis_ratio.Rd +++ b/man/derive_var_analysis_ratio.Rd @@ -7,7 +7,9 @@ derive_var_analysis_ratio(dataset, numer_var, denom_var, new_var = NULL) } \arguments{ -\item{dataset}{Input dataset} +\item{dataset}{Input dataset + +The variables specified by the \code{numer_var} and \code{denom_var} argument(s) to be expected.} \item{numer_var}{Variable containing numeric values to be used in the numerator of the ratio calculation.} diff --git a/man/derive_var_anrind.Rd b/man/derive_var_anrind.Rd index 6329f74bc4..b7a0999c7f 100644 --- a/man/derive_var_anrind.Rd +++ b/man/derive_var_anrind.Rd @@ -7,7 +7,9 @@ derive_var_anrind(dataset, use_a1hia1lo = FALSE) } \arguments{ -\item{dataset}{The input dataset} +\item{dataset}{Input dataset +\code{ANRLO}, \code{ANRHI}, and \code{AVAL} are expected and if \code{use_a1hia1lo} is set to \code{TRUE}, +\code{A1LO} and \code{A1H1} are expected as well.} \item{use_a1hia1lo}{A logical value indicating whether to use \code{A1H1} and \code{A1LO} in the derivation of \code{ANRIND}.} diff --git a/man/derive_var_atoxgr.Rd b/man/derive_var_atoxgr.Rd index dab904a4e0..66fc8051ad 100644 --- a/man/derive_var_atoxgr.Rd +++ b/man/derive_var_atoxgr.Rd @@ -11,10 +11,10 @@ derive_var_atoxgr( ) } \arguments{ -\item{dataset}{Input data set +\item{dataset}{Input dataset -The columns \code{ATOXGRL}, \code{ATOXGRH} and specified by \code{lotox_description_var}, -and \code{hitox_description_var} parameters are expected.} +The variables specified by the \code{lotox_description_var} and \code{hitox_description_var} argument(s) to be expected. +\code{ATOXGRL}, and \code{ATOXGRH} are expected as well.} \item{lotox_description_var}{Variable containing the toxicity grade description for low values, eg. "Anemia"} diff --git a/man/derive_var_atoxgr_dir.Rd b/man/derive_var_atoxgr_dir.Rd index ed8e9b40d3..d9b2d5719b 100644 --- a/man/derive_var_atoxgr_dir.Rd +++ b/man/derive_var_atoxgr_dir.Rd @@ -15,9 +15,9 @@ derive_var_atoxgr_dir( ) } \arguments{ -\item{dataset}{Input data set +\item{dataset}{Input dataset -The columns specified by \code{tox_description_var} parameter is expected.} +The variables specified by the \code{tox_description_var} argument(s) to be expected.} \item{new_var}{Name of the character grade variable to create, for example, \code{ATOXGRH} or \code{ATOXGRL}.} diff --git a/man/derive_var_base.Rd b/man/derive_var_base.Rd index 807057db36..aa4e90c893 100644 --- a/man/derive_var_base.Rd +++ b/man/derive_var_base.Rd @@ -13,7 +13,9 @@ derive_var_base( ) } \arguments{ -\item{dataset}{The input dataset} +\item{dataset}{Input dataset + +The variables specified by the \code{by_vars} and \code{source_var} argument(s) to be expected.} \item{by_vars}{Grouping variables uniquely identifying a set of records for which to calculate \code{new_var}} diff --git a/man/derive_var_chg.Rd b/man/derive_var_chg.Rd index 5a0b8de486..8a8df5a60b 100644 --- a/man/derive_var_chg.Rd +++ b/man/derive_var_chg.Rd @@ -7,8 +7,7 @@ derive_var_chg(dataset) } \arguments{ -\item{dataset}{The input dataset. Required variables are \code{AVAL} and -\code{BASE}.} +\item{dataset}{Input dataset \code{AVAL} and \code{BASE} are expected.} } \value{ The input dataset with an additional column named \code{CHG} diff --git a/man/derive_var_dthcaus.Rd b/man/derive_var_dthcaus.Rd index b94ba192d9..f4959dc96d 100644 --- a/man/derive_var_dthcaus.Rd +++ b/man/derive_var_dthcaus.Rd @@ -12,9 +12,9 @@ derive_var_dthcaus( ) } \arguments{ -\item{dataset}{Input dataset. +\item{dataset}{Input dataset -The variables specified by \code{subject_keys} are required.} +The variables specified by the \code{subject_keys} argument(s) to be expected.} \item{...}{Objects of class "dthcaus_source" created by \code{\link[=dthcaus_source]{dthcaus_source()}}.} diff --git a/man/derive_var_extreme_dt.Rd b/man/derive_var_extreme_dt.Rd index 33eca0f7de..e9052f35eb 100644 --- a/man/derive_var_extreme_dt.Rd +++ b/man/derive_var_extreme_dt.Rd @@ -16,7 +16,7 @@ derive_var_extreme_dt( \arguments{ \item{dataset}{Input dataset -The variables specified by \code{subject_keys} are required.} +The variables specified by the \code{subject_keys} argument(s) to be expected.} \item{new_var}{Name of variable to create} diff --git a/man/derive_var_extreme_dtm.Rd b/man/derive_var_extreme_dtm.Rd index 2a891d5d13..309e593770 100644 --- a/man/derive_var_extreme_dtm.Rd +++ b/man/derive_var_extreme_dtm.Rd @@ -16,7 +16,7 @@ derive_var_extreme_dtm( \arguments{ \item{dataset}{Input dataset -The variables specified by \code{subject_keys} are required.} +The variables specified by the \code{subject_keys} argument(s) to be expected.} \item{new_var}{Name of variable to create} diff --git a/man/derive_var_extreme_flag.Rd b/man/derive_var_extreme_flag.Rd index acc55fa615..a1211565d3 100644 --- a/man/derive_var_extreme_flag.Rd +++ b/man/derive_var_extreme_flag.Rd @@ -17,7 +17,7 @@ derive_var_extreme_flag( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter are expected.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{by_vars}{Grouping variables diff --git a/man/derive_var_joined_exist_flag.Rd b/man/derive_var_joined_exist_flag.Rd index 21321c43dd..b1f6f4455d 100644 --- a/man/derive_var_joined_exist_flag.Rd +++ b/man/derive_var_joined_exist_flag.Rd @@ -22,8 +22,7 @@ derive_var_joined_exist_flag( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} and \code{join_vars} parameter are -expected.} +The variables specified by the \code{by_vars} and \code{join_vars} argument(s) to be expected.} \item{by_vars}{By variables diff --git a/man/derive_var_merged_exist_flag.Rd b/man/derive_var_merged_exist_flag.Rd index b86c0ef87b..ae0728a4bd 100644 --- a/man/derive_var_merged_exist_flag.Rd +++ b/man/derive_var_merged_exist_flag.Rd @@ -19,7 +19,7 @@ derive_var_merged_exist_flag( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} argument are expected.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Additional dataset diff --git a/man/derive_var_merged_summary.Rd b/man/derive_var_merged_summary.Rd index 5a7ff2fd0f..c381428de8 100644 --- a/man/derive_var_merged_summary.Rd +++ b/man/derive_var_merged_summary.Rd @@ -17,7 +17,7 @@ derive_var_merged_summary( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} argument are expected.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Additional dataset diff --git a/man/derive_var_obs_number.Rd b/man/derive_var_obs_number.Rd index f9fae3a7ee..d4c54e6881 100644 --- a/man/derive_var_obs_number.Rd +++ b/man/derive_var_obs_number.Rd @@ -15,8 +15,7 @@ derive_var_obs_number( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{order} and the \code{by_vars} parameter are -expected.} +The variables specified by the \code{by_vars} and \code{order} argument(s) to be expected.} \item{by_vars}{Grouping variables diff --git a/man/derive_var_ontrtfl.Rd b/man/derive_var_ontrtfl.Rd index be267b1b11..530c7c42a2 100644 --- a/man/derive_var_ontrtfl.Rd +++ b/man/derive_var_ontrtfl.Rd @@ -18,7 +18,7 @@ derive_var_ontrtfl( ) } \arguments{ -\item{dataset}{Input dataset. +\item{dataset}{Input dataset Required columns are \code{start_date}, \code{end_date}, \code{ref_start_date} and \code{ref_end_date}.} diff --git a/man/derive_var_pchg.Rd b/man/derive_var_pchg.Rd index 428950b05a..70b6749fcb 100644 --- a/man/derive_var_pchg.Rd +++ b/man/derive_var_pchg.Rd @@ -7,8 +7,8 @@ derive_var_pchg(dataset) } \arguments{ -\item{dataset}{The input dataset. Required variables are \code{AVAL} and -\code{BASE}.} +\item{dataset}{Input dataset +\code{AVAL} and \code{BASE} are expected.} } \value{ The input dataset with an additional column named \code{PCHG} diff --git a/man/derive_var_relative_flag.Rd b/man/derive_var_relative_flag.Rd index 9d07da3360..ac017c896d 100644 --- a/man/derive_var_relative_flag.Rd +++ b/man/derive_var_relative_flag.Rd @@ -20,8 +20,7 @@ derive_var_relative_flag( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{order} and the \code{by_vars} argument are -expected.} +The variables specified by the \code{by_vars} and \code{order} argument(s) to be expected.} \item{by_vars}{Grouping variables diff --git a/man/derive_var_shift.Rd b/man/derive_var_shift.Rd index ac4ff9fdfd..9a46f1e001 100644 --- a/man/derive_var_shift.Rd +++ b/man/derive_var_shift.Rd @@ -17,7 +17,7 @@ derive_var_shift( \arguments{ \item{dataset}{Input dataset -The columns specified by \code{from_var} and the \code{to_var} parameters are expected.} +The variables specified by the \code{from_var} and \code{to_var} argument(s) to be expected.} \item{new_var}{Name of the character shift variable to create.} diff --git a/man/derive_var_trtdurd.Rd b/man/derive_var_trtdurd.Rd index 81707b483b..940a28240e 100644 --- a/man/derive_var_trtdurd.Rd +++ b/man/derive_var_trtdurd.Rd @@ -9,8 +9,7 @@ derive_var_trtdurd(dataset, start_date = TRTSDT, end_date = TRTEDT) \arguments{ \item{dataset}{Input dataset -The columns specified by the \code{start_date} and the \code{end_date} parameter are -expected.} +The variables specified by the \code{start_date} and \code{end_date} argument(s) to be expected.} \item{start_date}{The start date diff --git a/man/derive_vars_aage.Rd b/man/derive_vars_aage.Rd index 189334d6ac..eebd490340 100644 --- a/man/derive_vars_aage.Rd +++ b/man/derive_vars_aage.Rd @@ -16,8 +16,7 @@ derive_vars_aage( \arguments{ \item{dataset}{Input dataset -The columns specified by the \code{start_date} and the \code{end_date} parameter are -expected.} +The variables specified by the \code{start_date} and \code{end_date} argument(s) to be expected.} \item{start_date}{The start date diff --git a/man/derive_vars_atc.Rd b/man/derive_vars_atc.Rd index 0f9e8f8bde..a289247569 100644 --- a/man/derive_vars_atc.Rd +++ b/man/derive_vars_atc.Rd @@ -14,7 +14,7 @@ derive_vars_atc( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter are required} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_facm}{FACM dataset diff --git a/man/derive_vars_dt.Rd b/man/derive_vars_dt.Rd index 176dc48bef..1dbc3fb6b4 100644 --- a/man/derive_vars_dt.Rd +++ b/man/derive_vars_dt.Rd @@ -17,9 +17,9 @@ derive_vars_dt( ) } \arguments{ -\item{dataset}{Input dataset. +\item{dataset}{Input dataset -The date character vector (\code{dtc}) must be present.} +The variables specified by the \code{dtc} argument(s) to be expected.} \item{new_vars_prefix}{Prefix used for the output variable(s). diff --git a/man/derive_vars_dtm.Rd b/man/derive_vars_dtm.Rd index 32ca6c207e..f8bbd4f8c0 100644 --- a/man/derive_vars_dtm.Rd +++ b/man/derive_vars_dtm.Rd @@ -21,7 +21,7 @@ derive_vars_dtm( \arguments{ \item{dataset}{Input dataset -The date character vector (\code{dtc}) must be present.} +The variables specified by the \code{dtc} argument(s) to be expected.} \item{new_vars_prefix}{Prefix used for the output variable(s). diff --git a/man/derive_vars_dtm_to_dt.Rd b/man/derive_vars_dtm_to_dt.Rd index 0efcdcb227..769f3f93fe 100644 --- a/man/derive_vars_dtm_to_dt.Rd +++ b/man/derive_vars_dtm_to_dt.Rd @@ -7,7 +7,9 @@ derive_vars_dtm_to_dt(dataset, source_vars) } \arguments{ -\item{dataset}{Input dataset} +\item{dataset}{Input dataset + +The variables specified by the \code{source_vars} argument(s) to be expected.} \item{source_vars}{A list of datetime variables created using \code{exprs()} from which dates are to be extracted} diff --git a/man/derive_vars_dtm_to_tm.Rd b/man/derive_vars_dtm_to_tm.Rd index 1f3c7be482..9d107f2f2c 100644 --- a/man/derive_vars_dtm_to_tm.Rd +++ b/man/derive_vars_dtm_to_tm.Rd @@ -7,7 +7,9 @@ derive_vars_dtm_to_tm(dataset, source_vars) } \arguments{ -\item{dataset}{Input dataset} +\item{dataset}{Input dataset + +The variables specified by the \code{source_vars} argument(s) to be expected.} \item{source_vars}{A list of datetime variables created using \code{exprs()} from which time is to be extracted} diff --git a/man/derive_vars_duration.Rd b/man/derive_vars_duration.Rd index 0dcee21daa..cb6676ab84 100644 --- a/man/derive_vars_duration.Rd +++ b/man/derive_vars_duration.Rd @@ -21,8 +21,7 @@ derive_vars_duration( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{start_date} and the \code{end_date} parameter are -expected.} +The variables specified by the \code{start_date} and \code{end_date} argument(s) to be expected.} \item{new_var}{Name of variable to create} diff --git a/man/derive_vars_dy.Rd b/man/derive_vars_dy.Rd index cc2de470cf..c0e3ddac4b 100644 --- a/man/derive_vars_dy.Rd +++ b/man/derive_vars_dy.Rd @@ -9,8 +9,7 @@ derive_vars_dy(dataset, reference_date, source_vars) \arguments{ \item{dataset}{Input dataset -The columns specified by the \code{reference_date} and the \code{source_vars} -parameter are expected.} +The variables specified by the \code{reference_date} and \code{source_vars} argument(s) to be expected.} \item{reference_date}{A date or date-time column, e.g., date of first treatment or date-time of last exposure to treatment. diff --git a/man/derive_vars_joined.Rd b/man/derive_vars_joined.Rd index 0073930145..1b3452d615 100644 --- a/man/derive_vars_joined.Rd +++ b/man/derive_vars_joined.Rd @@ -22,7 +22,7 @@ derive_vars_joined( \arguments{ \item{dataset}{Input dataset -The variables specified by \code{by_vars} are expected.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Additional dataset diff --git a/man/derive_vars_merged.Rd b/man/derive_vars_merged.Rd index 78e415ce4d..ab959ed89f 100644 --- a/man/derive_vars_merged.Rd +++ b/man/derive_vars_merged.Rd @@ -22,7 +22,7 @@ derive_vars_merged( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} argument are expected.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Additional dataset diff --git a/man/derive_vars_merged_lookup.Rd b/man/derive_vars_merged_lookup.Rd index 80761151a2..3024d10083 100644 --- a/man/derive_vars_merged_lookup.Rd +++ b/man/derive_vars_merged_lookup.Rd @@ -20,7 +20,7 @@ derive_vars_merged_lookup( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} argument are expected.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Lookup table diff --git a/man/derive_vars_period.Rd b/man/derive_vars_period.Rd index 05dd4dc48b..2d00f227b3 100644 --- a/man/derive_vars_period.Rd +++ b/man/derive_vars_period.Rd @@ -12,9 +12,9 @@ derive_vars_period( ) } \arguments{ -\item{dataset}{ADSL dataset +\item{dataset}{Input dataset -The variables specified by \code{subject_keys} are expected.} +The variables specified by the \code{subject_keys} argument(s) to be expected.} \item{dataset_ref}{Period reference dataset diff --git a/man/derive_vars_query.Rd b/man/derive_vars_query.Rd index 16a91bd87c..33452967df 100644 --- a/man/derive_vars_query.Rd +++ b/man/derive_vars_query.Rd @@ -7,7 +7,7 @@ derive_vars_query(dataset, dataset_queries) } \arguments{ -\item{dataset}{Input dataset.} +\item{dataset}{Input dataset} \item{dataset_queries}{A dataset containing required columns \code{PREFIX}, \code{GRPNAME}, \code{SRCVAR}, \code{TERMNAME}, \code{TERMID}, and optional columns diff --git a/man/derive_vars_transposed.Rd b/man/derive_vars_transposed.Rd index effa25f80c..8195dd1166 100644 --- a/man/derive_vars_transposed.Rd +++ b/man/derive_vars_transposed.Rd @@ -16,7 +16,7 @@ derive_vars_transposed( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{by_vars} parameter are required} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_merge}{Dataset to transpose and merge diff --git a/man/extract_duplicate_records.Rd b/man/extract_duplicate_records.Rd index 6c29348703..3a1f4213e9 100644 --- a/man/extract_duplicate_records.Rd +++ b/man/extract_duplicate_records.Rd @@ -7,7 +7,9 @@ extract_duplicate_records(dataset, by_vars) } \arguments{ -\item{dataset}{A data frame} +\item{dataset}{Input dataset + +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{by_vars}{A list of expressions created using \code{exprs()} identifying groups of records in which to look for duplicates} diff --git a/man/filter_exist.Rd b/man/filter_exist.Rd index 20697b3916..cc176c23ce 100644 --- a/man/filter_exist.Rd +++ b/man/filter_exist.Rd @@ -9,7 +9,7 @@ filter_exist(dataset, dataset_add, by_vars, filter_add = NULL) \arguments{ \item{dataset}{Input dataset -The variables specified in the \code{by_vars} parameter are expected in this dataset.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Source dataset diff --git a/man/filter_extreme.Rd b/man/filter_extreme.Rd index 6842ff97e6..0e7d5bbc3b 100644 --- a/man/filter_extreme.Rd +++ b/man/filter_extreme.Rd @@ -9,8 +9,7 @@ filter_extreme(dataset, by_vars = NULL, order, mode, check_type = "warning") \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{order} and the \code{by_vars} parameter are -expected.} +The variables specified by the \code{by_vars} and \code{order} argument(s) to be expected.} \item{by_vars}{Grouping variables diff --git a/man/filter_joined.Rd b/man/filter_joined.Rd index 8361945017..09c6b5f660 100644 --- a/man/filter_joined.Rd +++ b/man/filter_joined.Rd @@ -19,8 +19,7 @@ filter_joined( \arguments{ \item{dataset}{Input dataset -The variables specified for \code{by_vars}, \code{join_vars}, and \code{order} are -expected.} +The variables specified by the \code{by_vars}, \code{order} and \code{join_vars} argument(s) to be expected.} \item{by_vars}{By variables diff --git a/man/filter_not_exist.Rd b/man/filter_not_exist.Rd index ae8c3d1f0c..57f0065aff 100644 --- a/man/filter_not_exist.Rd +++ b/man/filter_not_exist.Rd @@ -9,7 +9,7 @@ filter_not_exist(dataset, dataset_add, by_vars, filter_add = NULL) \arguments{ \item{dataset}{Input dataset -The variables specified in the \code{by_vars} parameter are expected in this dataset.} +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{dataset_add}{Source dataset diff --git a/man/filter_relative.Rd b/man/filter_relative.Rd index 220ce39caf..dd0f532da7 100644 --- a/man/filter_relative.Rd +++ b/man/filter_relative.Rd @@ -19,8 +19,7 @@ filter_relative( \arguments{ \item{dataset}{Input dataset -The variables specified by the \code{order} and the \code{by_vars} parameter are -expected.} +The variables specified by the \code{by_vars} and \code{order} argument(s) to be expected.} \item{by_vars}{Grouping variables diff --git a/man/get_hori_data.Rd b/man/get_hori_data.Rd index e416b453b9..9be797f41b 100644 --- a/man/get_hori_data.Rd +++ b/man/get_hori_data.Rd @@ -7,7 +7,9 @@ get_hori_data(dataset, by_vars, parameters, set_values_to, filter) } \arguments{ -\item{dataset}{Input dataset} +\item{dataset}{Input dataset + +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{by_vars}{By variables} diff --git a/man/get_summary_records.Rd b/man/get_summary_records.Rd index 55ac3bf4b0..53d93239ce 100644 --- a/man/get_summary_records.Rd +++ b/man/get_summary_records.Rd @@ -14,7 +14,9 @@ get_summary_records( ) } \arguments{ -\item{dataset}{A data frame.} +\item{dataset}{Input dataset + +The variables specified by the \code{by_vars} and \code{analysis_var} argument(s) to be expected.} \item{by_vars}{Variables to consider for generation of groupwise summary records. Providing the names of variables in \code{\link[=exprs]{exprs()}} will create a diff --git a/man/signal_duplicate_records.Rd b/man/signal_duplicate_records.Rd index 1076de7329..04e06cdb66 100644 --- a/man/signal_duplicate_records.Rd +++ b/man/signal_duplicate_records.Rd @@ -13,7 +13,9 @@ signal_duplicate_records( ) } \arguments{ -\item{dataset}{A data frame} +\item{dataset}{Input dataset + +The variables specified by the \code{by_vars} argument(s) to be expected.} \item{by_vars}{A list of expressions created using \code{exprs()} identifying groups of records in which to look for duplicates} diff --git a/tests/testthat/test-roxygen2.R b/tests/testthat/test-roxygen2.R new file mode 100644 index 0000000000..a0b31eb094 --- /dev/null +++ b/tests/testthat/test-roxygen2.R @@ -0,0 +1,16 @@ +# roxygen_param_dataset ---- +## Test 1: Input dataset standardized text works ---- +test_that("roxygen_param_dataset Test 1: Input dataset standardized text works", { + expect_equal("Input dataset", roxygen_param_dataset(expected_vars = NULL)) +}) + +## Test 2: Input dataset standardized text works ---- +test_that("roxygen_param_dataset Test 2: Input dataset standardized text works", { + expect_equal( + paste0( + "Input dataset \n \n", + "The variables specified by the `by_vars` argument(s) to be expected." + ), + roxygen_param_dataset(expected_vars = c("by_vars")) + ) +})