Skip to content

Commit

Permalink
Merge branch 'devel' into 1300_refactor_imputation
Browse files Browse the repository at this point in the history
  • Loading branch information
bundfussr committed Aug 9, 2022
2 parents d55ac12 + ea5311e commit 96749e0
Show file tree
Hide file tree
Showing 244 changed files with 4,636 additions and 605 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ have been removed:

## Various

- Restructured Reference page and updated **all** functions to use `family` tag
in roxygen headers for finding similar functions. (#1105)

# admiral 0.7.1

- `derive_vars_last_dose()` no longer fails when a variable renamed in `new_vars` is supplied
Expand Down
1 change: 1 addition & 0 deletions R/admiral-package.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' @keywords internal
#' @family internal
#' @importFrom dplyr arrange bind_rows case_when desc ends_with filter full_join group_by
#' if_else mutate mutate_at mutate_if n pull rename rename_at row_number select slice
#' starts_with transmute ungroup vars n_distinct union distinct
Expand Down
57 changes: 38 additions & 19 deletions R/assertions.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' library(admiral.test)
Expand Down Expand Up @@ -101,7 +102,8 @@ assert_data_frame <- function(arg,
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(msg_type) {
Expand Down Expand Up @@ -191,7 +193,8 @@ assert_character_scalar <- function(arg,
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(chr) {
Expand Down Expand Up @@ -251,7 +254,8 @@ assert_character_vector <- function(arg, values = NULL, optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(flag) {
Expand Down Expand Up @@ -298,7 +302,8 @@ assert_logical_scalar <- function(arg, optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' library(admiral.test)
Expand Down Expand Up @@ -376,7 +381,8 @@ assert_expr <- function(arg, optional = FALSE) {
#' Otherwise throws an informative error.
#'
#' @export
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#' @author Ondrej Slama
#'
#' @examples
Expand Down Expand Up @@ -434,7 +440,8 @@ assert_filter_cond <- function(arg, optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(by_vars) {
Expand Down Expand Up @@ -498,7 +505,8 @@ assert_vars <- function(arg, optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(by_vars) {
Expand Down Expand Up @@ -556,7 +564,8 @@ assert_order_vars <- function(arg, optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(num1, num2) {
Expand Down Expand Up @@ -614,7 +623,8 @@ assert_integer_scalar <- function(arg, subset = "none", optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(num) {
Expand Down Expand Up @@ -745,7 +755,8 @@ assert_date_var <- function(dataset, var, dataset_name = NULL, var_name = NULL)
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(obj) {
Expand Down Expand Up @@ -796,7 +807,8 @@ assert_s3_class <- function(arg, class, optional = TRUE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(list) {
Expand Down Expand Up @@ -892,7 +904,8 @@ assert_list_of_formulas <- function(arg, optional = FALSE) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' library(admiral.test)
Expand Down Expand Up @@ -943,7 +956,8 @@ assert_has_variables <- function(dataset, required_vars) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' example_fun <- function(fun) {
Expand Down Expand Up @@ -1032,7 +1046,8 @@ assert_function_param <- function(arg, params) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' library(tibble)
Expand Down Expand Up @@ -1102,7 +1117,8 @@ assert_unit <- function(dataset, param, required_unit, get_unit_expr) {
#'
#' @export
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @examples
#' library(tibble)
Expand Down Expand Up @@ -1150,7 +1166,8 @@ assert_param_does_not_exist <- function(dataset, param) {
#' The function throws an error if `arg` is not a list of variable-value expressions.
#' Otherwise, the input it returned invisibly.
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @export
#'
Expand Down Expand Up @@ -1300,7 +1317,8 @@ assert_varval_list <- function(arg, # nolint
#' @return
#' An error if the condition is not meet. The input otherwise.
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @export
#'
Expand Down Expand Up @@ -1393,7 +1411,8 @@ assert_list_element <- function(list, element, condition, message_text, ...) {
#' @return
#' An error if the condition is not meet. The input otherwise.
#'
#' @keywords assertion
#' @family move_adm_dev
#' @keywords move_adm_dev
#'
#' @export
#'
Expand Down
4 changes: 3 additions & 1 deletion R/call_derivation.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#' The input dataset with additional records/variables added depending on
#' which `derivation` has been used.
#'
#' @keywords user_utility high_order_function
#' @family high_order_function
#' @keywords high_order_function
#'
#' @export
#'
Expand Down Expand Up @@ -102,6 +103,7 @@ call_derivation <- function(dataset = NULL, derivation, variable_params, ...) {
#'
#' @return An object of class `params`
#'
#' @family source_specifications
#' @keywords source_specifications
#'
#' @export
Expand Down
3 changes: 2 additions & 1 deletion R/call_user_fun.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#'
#' @return The return value of the function call
#'
#' @keywords dev_utility
#' @family utils_help
#' @keywords utils_help
#'
#' @export
#'
Expand Down
4 changes: 3 additions & 1 deletion R/compute_duration.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
#'
#' @return The duration between the two date in the specified unit
#'
#' @keywords computation adam timing
#' @family com_date_time
#'
#' @keywords com_date_time
#'
#' @export
#'
Expand Down
30 changes: 26 additions & 4 deletions R/create_query_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
#' @return A dataset to be used as input dataset to the `dataset_queries`
#' argument in `derive_vars_query()`
#'
#' @keywords adae adcm user_utility
#' @family der_occds
#' @keywords der_occds
#'
#' @seealso [derive_vars_query()], [query()], [smq_select()], [sdg_select()], [Queries Dataset
#' Documentation](../articles/queries_dataset.html)
Expand Down Expand Up @@ -381,6 +382,9 @@ create_query_data <- function(queries,
#'
#' *Permitted Values*: `"smq"`, `"sdg"`
#'
#' @family der_occds
#' @keywords der_occds
#'
#' @return Output dataset of the access function
#'
#' @author Stefan Bundfuss
Expand Down Expand Up @@ -452,6 +456,9 @@ get_terms_from_db <- function(version,
#'
#' Should be `"SMQ`" or `"SDG"`.
#'
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @return An error is issued if `version` or `fun` is null.
#'
#' @author Stefan Bundfuss
Expand Down Expand Up @@ -562,6 +569,7 @@ assert_db_requirements <- function(version, version_arg_name, fun, fun_arg_name,
#' @seealso [create_query_data()], [smq_select()], [sdg_select()], [Queries Dataset
#' Documentation](../articles/queries_dataset.html)
#'
#' @family source_specifications
#' @keywords source_specifications
#'
#' @export
Expand Down Expand Up @@ -654,6 +662,9 @@ query <- function(prefix,
#'
#' @author Stefan Bundfuss
#'
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @seealso [query()]
#'
#' @export
Expand Down Expand Up @@ -795,7 +806,8 @@ validate_query <- function(obj) {
#'
#' @seealso [create_query_data()], [query()]
#'
#' @keywords assertion
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @author Stefan Bundfuss
assert_terms <- function(terms,
Expand Down Expand Up @@ -885,6 +897,7 @@ assert_terms <- function(terms,
#'
#' @seealso [create_query_data()], [query()]
#'
#' @family source_specifications
#' @keywords source_specifications
#'
#' @export
Expand All @@ -906,6 +919,9 @@ smq_select <- function(name = NULL,
#'
#' @seealso [smq_select()]
#'
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @author Stefan Bundfuss
#'
#' @export
Expand Down Expand Up @@ -951,7 +967,8 @@ validate_smq_select <- function(obj) {
#'
#' @seealso [smq_select()]
#'
#' @keywords dev_utility
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @export
#'
Expand Down Expand Up @@ -986,6 +1003,7 @@ format.smq_select <- function(x, ...) {
#'
#' @seealso [create_query_data()], [query()]
#'
#' @family source_specifications
#' @keywords source_specifications
#'
#' @export
Expand All @@ -1007,6 +1025,9 @@ sdg_select <- function(name = NULL,
#'
#' @seealso [sdg_select()]
#'
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @export
#'
#' @return The original object.
Expand Down Expand Up @@ -1045,7 +1066,8 @@ validate_sdg_select <- function(obj) {
#'
#' @seealso [sdg_select()]
#'
#' @keywords dev_utility
#' @keywords move_adm_dev
#' @family move_adm_dev
#'
#' @export
#'
Expand Down
4 changes: 3 additions & 1 deletion R/create_single_dose_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#' @export
#'
#' @keywords metadata
#' @family metadata
#'
#' @rdname dose_freq_lookup

Expand Down Expand Up @@ -240,7 +241,8 @@ dose_freq_lookup <- tibble::tribble(
#'
#' @author Michael Thorpe, Andrew Smith
#'
#' @keywords adae adex user_utility
#' @family der_occds
#' @keywords der_occds
#'
#' @return The input dataset with a single dose per row.
#'
Expand Down
Loading

0 comments on commit 96749e0

Please sign in to comment.