Skip to content

Commit

Permalink
docs: slight improvement on examples
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Nov 2, 2023
1 parent c5c7599 commit 9b57e74
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
14 changes: 10 additions & 4 deletions R/join_keys.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @export
#'
#' @examples
#' # setting join keys
#' # Setting join keys ----
#'
#' jk <- join_keys(
#' join_key("dataset_A", "dataset_B", c("col_1" = "col_a")),
Expand Down Expand Up @@ -68,7 +68,7 @@ join_keys <- function(...) {
#' @export
#' @examples
#'
#' # Using the setter (assignment)
#' # Using the setter (assignment) ----
#'
#' jk <- join_keys()
#' join_keys(jk)
Expand Down Expand Up @@ -115,6 +115,8 @@ join_keys <- function(...) {
#' @export
#' @examples
#'
#' # Setter for JoinKeys within teal_data ----
#'
#' td <- teal_data()
#' join_keys(td)["ds1", "ds2"] <- "key1"
#' join_keys(td)["ds2", "ds2"] <- "key2"
Expand Down Expand Up @@ -146,7 +148,7 @@ join_keys <- function(...) {
#'
#' @examples
#'
#' # Getter for JoinKeys
#' # Getter for JoinKeys ----
#'
#' jk <- join_keys()
#' join_keys(jk) <- join_key("ds1", "ds2", "some_col")
Expand Down Expand Up @@ -195,7 +197,7 @@ join_keys <- function(...) {
#'
#' @examples
#'
#' # Setter via index
#' # Setter via index ----
#'
#' jk <- join_keys()
#' join_keys(jk) <- join_key("ds1", "ds2", "(original) pair key")
Expand Down Expand Up @@ -235,6 +237,9 @@ mutate_join_keys <- function(x, dataset_1, dataset_2, value) {
#' @rdname mutate_join_keys
#' @export
#' @examples
#'
#' # JoinKeys ----
#'
#' jk <- join_keys()
#' join_keys(jk) <- list(ds1 = list(ds2 = "some_col"))
#' mutate_join_keys(jk, "ds2", "ds3", "another")
Expand All @@ -260,6 +265,7 @@ mutate_join_keys.JoinKeys <- function(x, dataset_1, dataset_2, value) {
#' @rdname mutate_join_keys
#' @export
#' @examples
#'
#' # teal_data ----
#'
#' ADSL <- teal.data::example_cdisc_data("ADSL")
Expand Down
10 changes: 6 additions & 4 deletions man/join_keys.Rd

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

6 changes: 5 additions & 1 deletion man/mutate_join_keys.Rd

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

0 comments on commit 9b57e74

Please sign in to comment.