Skip to content

Commit

Permalink
Improve list_modify() examples (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
asadow authored Jul 15, 2024
1 parent 215a01a commit 7968396
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions R/list-modify.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
#'
#' # Update values
#' str(list_assign(x, a = 1))
#'
#' # Replace values
#' str(list_assign(x, z = 5))
#' str(list_assign(x, z = NULL))
#'
#' str(list_assign(x, z = list(a = 1:5)))
#' # replace recursively, leaving the other elements of z alone
#'
#' # Replace recursively with list_modify(), leaving the other elements of z alone
#' str(list_modify(x, z = list(a = 1:5)))
#'
#' # Remove values
Expand Down
5 changes: 3 additions & 2 deletions man/list_assign.Rd

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

0 comments on commit 7968396

Please sign in to comment.