Skip to content

Commit

Permalink
Update list-modify.R
Browse files Browse the repository at this point in the history
Consistent formatting of line breaks and more clear use of list_modify() - it was easy to miss the change from list_assign() previously
  • Loading branch information
asadow authored Feb 1, 2024
1 parent 870696c commit 2bc0299
Showing 1 changed file with 3 additions and 2 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

0 comments on commit 2bc0299

Please sign in to comment.