Skip to content

Commit

Permalink
#2126 unify_joined: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryekohe committed Nov 6, 2023
1 parent 0d3f8db commit 59f303b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 29 deletions.
4 changes: 2 additions & 2 deletions R/derive_extreme_event.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
#' @param mode Selection mode (first or last)
#'
#' If a particular event from `events` has more than one observation,
#' "first"/"last" is to select the first/last record of this type of events
#' sorting by `order`.
#' `"first"`/`"last"` is used to select the first/last record of this type of
#' event sorting by `order`.
#'
#' *Permitted Values:* `"first"`, `"last"`
#'
Expand Down
10 changes: 5 additions & 5 deletions R/derive_joined.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
#' not fulfilled for any of the other observations, no observations are
#' considered.
#'
#' This parameter should be specified if `filter_join` contains summary
#' This argument should be specified if `filter_join` contains summary
#' functions which should not apply to all observations but only from a
#' certain observation before the current observation up to the current
#' observation. For an example see the last example below.
Expand All @@ -113,7 +113,7 @@
#' condition is not fulfilled for any of the other observations, no
#' observations are considered.
#'
#' This parameter should be specified if `filter_join` contains summary
#' This argument should be specified if `filter_join` contains summary
#' functions which should not apply to all observations but only up to the
#' confirmation assessment. For an example see the last example below.
#'
Expand Down Expand Up @@ -669,7 +669,7 @@ derive_vars_joined <- function(dataset,
#' not fulfilled for any of the other observations, no observations are
#' considered, i.e., the observation is not flagged.
#'
#' This parameter should be specified if `filter_join` contains summary
#' This argument should be specified if `filter_join` contains summary
#' functions which should not apply to all observations but only from a
#' certain observation before the current observation up to the current
#' observation.
Expand All @@ -681,7 +681,7 @@ derive_vars_joined <- function(dataset,
#' condition is not fulfilled for any of the other observations, no
#' observations are considered, i.e., the observation is not flagged.
#'
#' This parameter should be specified if `filter_join` contains summary
#' This argument should be specified if `filter_join` contains summary
#' functions which should not apply to all observations but only up to the
#' confirmation assessment.
#'
Expand Down Expand Up @@ -751,7 +751,7 @@ get_joined_data <- function(dataset,
filter_add = NULL,
filter_join = NULL,
check_type = "warning") {
# Check input parameters
# Check input arguments
assert_vars(by_vars, optional = TRUE)
by_vars_left <- replace_values_by_names(by_vars)
assert_expr_list(join_vars, optional = TRUE)
Expand Down
5 changes: 0 additions & 5 deletions R/derive_var_joined_exist_flag.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,8 @@
#'
#' @param true_value Value of `new_var` for flagged observations
#'
#' *Default*: `"Y"`
#'
#' @param false_value Value of `new_var` for observations not flagged
#'
#' *Default*: `NA_character_`
#'
#' @inheritParams get_joined_data
#'
#' @details
Expand Down Expand Up @@ -238,7 +234,6 @@
#'
#' @examples
#' library(tibble)
#' library(admiral)
#'
#' # flag observations with a duration longer than 30 and
#' # at, after, or up to 7 days before a COVID AE (ACOVFL == "Y")
Expand Down
4 changes: 2 additions & 2 deletions man/derive_extreme_event.Rd

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

9 changes: 2 additions & 7 deletions man/derive_var_joined_exist_flag.Rd

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

4 changes: 2 additions & 2 deletions man/derive_vars_joined.Rd

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

4 changes: 2 additions & 2 deletions man/get_joined_data.Rd

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

8 changes: 4 additions & 4 deletions tests/testthat/test-filter_joined.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ test_that("filter_joined Test 6: deprecation of `first_cond`", {
})

# min_cond ----
## Test 7: test it ----
test_that("min_cond Test 7: test it", {
## Test 7: minimum is derived correctly ----
test_that("min_cond Test 7: minimum is derived correctly", {
data <- tibble::tribble(
~USUBJID, ~AVISITN, ~AVALC,
"1", 1, "PR",
Expand Down Expand Up @@ -236,8 +236,8 @@ test_that("min_cond Test 7: test it", {
})

# max_cond ----
## Test 8: test it ----
test_that("max_cond Test 8: test it", {
## Test 8: maximum is derived correctly ----
test_that("max_cond Test 8: maximum is derived correctly", {
data <- tibble::tribble(
~USUBJID, ~AVISITN, ~AVALC,
"1", 1, "PR",
Expand Down

0 comments on commit 59f303b

Please sign in to comment.