Skip to content

Commit

Permalink
#2126 unify_joined: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bundfussr committed Oct 20, 2023
1 parent dc0e2b9 commit 770cd02
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 63 deletions.
22 changes: 11 additions & 11 deletions R/derive_extreme_event.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
#' ),
#' join_vars = exprs(AVALC, ADT),
#' join_type = "after",
#' first_cond = AVALC.join == "CR" &
#' first_cond_upper = AVALC.join == "CR" &
#' ADT.join >= ADT + 28,
#' condition = AVALC == "CR" &
#' all(AVALC.join %in% c("CR", "NE")) &
Expand All @@ -270,7 +270,7 @@
#' ),
#' join_vars = exprs(AVALC, ADT),
#' join_type = "after",
#' first_cond = AVALC.join %in% c("CR", "PR") &
#' first_cond_upper = AVALC.join %in% c("CR", "PR") &
#' ADT.join >= ADT + 28,
#' condition = AVALC == "PR" &
#' all(AVALC.join %in% c("CR", "PR", "NE")) &
Expand Down Expand Up @@ -573,15 +573,15 @@ event <- function(dataset_name = NULL,
#' will contribute to the extreme event.
#'
#' The condition is applied to the joined dataset for selecting the confirmed
#' observations. The condition can include summary functions. The joined
#' dataset is grouped by the original observations. I.e., the summary function
#' are applied to all observations up to the confirmation observation. For
#' example in the oncology setting when using this function for confirmed best
#' overall response, `condition = AVALC == "CR" & all(AVALC.join %in% c("CR",
#' "NE")) & count_vals(var = AVALC.join, val = "NE") <= 1` selects
#' observations with response "CR" and for all observations up to the
#' confirmation observation the response is "CR" or "NE" and there is at most
#' one "NE".
#' observations. The condition can include summary functions like `all()` or
#' `any()`. The joined dataset is grouped by the original observations. I.e.,
#' the summary function are applied to all observations up to the confirmation
#' observation. For example in the oncology setting when using this function
#' for confirmed best overall response, `condition = AVALC == "CR" &
#' all(AVALC.join %in% c("CR", "NE")) & count_vals(var = AVALC.join, val =
#' "NE") <= 1` selects observations with response "CR" and for all
#' observations up to the confirmation observation the response is "CR" or
#' "NE" and there is at most one "NE".
#'
#' *Permitted Values*: an unquoted condition
#'
Expand Down
11 changes: 7 additions & 4 deletions R/derive_joined.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
#' Variables created by `order` or `new_vars` arguments can be used in the
#' condition.
#'
#' The condition can include summary functions. The joined dataset is grouped
#' by the original observations.
#' The condition can include summary functions like `all()` or `any()`. The
#' joined dataset is grouped by the original observations.
#'
#' *Permitted Values*: a condition
#'
Expand Down Expand Up @@ -653,8 +653,8 @@ derive_vars_joined <- function(dataset,
#' Variables created by `order` or `new_vars` arguments can be used in the
#' condition.
#'
#' The condition can include summary functions. The additional dataset is
#' grouped by the by variables (`by_vars`).
#' The condition can include summary functions like `all()` or `any()`. The
#' additional dataset is grouped by the by variables (`by_vars`).
#'
#' *Permitted Values*: a condition
#'
Expand Down Expand Up @@ -690,6 +690,9 @@ derive_vars_joined <- function(dataset,
#' Variables created by `order` or `new_vars` arguments can be used in the
#' condition.
#'
#' The condition can include summary functions like `all()` or `any()`. The
#' joined dataset is grouped by the original observations.
#'
#' *Permitted Values*: a condition
#'
#' @param mode Selection mode
Expand Down
15 changes: 8 additions & 7 deletions R/derive_var_joined_exist_flag.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@
#' @param filter_join Condition for selecting observations
#'
#' The filter is applied to the joined dataset for flagging the confirmed
#' observations. The condition can include summary functions. The joined
#' dataset is grouped by the original observations. I.e., the summary function
#' are applied to all observations up to the confirmation observation. For
#' example, `filter_join = AVALC == "CR" & all(AVALC.join %in% c("CR", "NE")) &
#' count_vals(var = AVALC.join, val = "NE") <= 1` selects observations with
#' response "CR" and for all observations up to the confirmation observation
#' the response is "CR" or "NE" and there is at most one "NE".
#' observations. The condition can include summary functions like `all()` or
#' `any()`. The joined dataset is grouped by the original observations. I.e.,
#' the summary function are applied to all observations up to the confirmation
#' observation. For example, `filter_join = AVALC == "CR" & all(AVALC.join
#' %in% c("CR", "NE")) & count_vals(var = AVALC.join, val = "NE") <= 1`
#' selects observations with response "CR" and for all observations up to the
#' confirmation observation the response is "CR" or "NE" and there is at most
#' one "NE".
#'
#' @param filter Condition for selecting observations
#'
Expand Down
18 changes: 9 additions & 9 deletions R/filter_joined.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@
#' @param filter_join Condition for selecting observations
#'
#' The filter is applied to the joined dataset for selecting the confirmed
#' observations. The condition can include summary functions. The joined
#' dataset is grouped by the original observations. I.e., the summary function
#' are applied to all observations up to the confirmation observation. For
#' example in the oncology setting when using this function for confirmed best
#' overall response, `filter_join = AVALC == "CR" & all(AVALC.join %in% c("CR",
#' "NE")) & count_vals(var = AVALC.join, val = "NE") <= 1` selects
#' observations with response "CR" and for all observations up to the
#' confirmation observation the response is "CR" or "NE" and there is at most
#' one "NE".
#' observations. The condition can include summary functions like `all()` or
#' `any()`. The joined dataset is grouped by the original observations. I.e.,
#' the summary function are applied to all observations up to the confirmation
#' observation. For example in the oncology setting when using this function
#' for confirmed best overall response, `filter_join = AVALC == "CR" &
#' all(AVALC.join %in% c("CR", "NE")) & count_vals(var = AVALC.join, val =
#' "NE") <= 1` selects observations with response "CR" and for all
#' observations up to the confirmation observation the response is "CR" or
#' "NE" and there is at most one "NE".
#'
#' @param check_type Check uniqueness?
#'
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.

17 changes: 9 additions & 8 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.

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

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

15 changes: 7 additions & 8 deletions man/event_joined.Rd

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

15 changes: 7 additions & 8 deletions man/filter_joined.Rd

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

7 changes: 5 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.

0 comments on commit 770cd02

Please sign in to comment.