From 2bc02997ea6946f4a6ed802fa98ff6f1e8eae3c5 Mon Sep 17 00:00:00 2001 From: Adam Sadowski <40274818+asadow@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:38:38 -0500 Subject: [PATCH 1/2] Update list-modify.R Consistent formatting of line breaks and more clear use of list_modify() - it was easy to miss the change from list_assign() previously --- R/list-modify.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/list-modify.R b/R/list-modify.R index 8d3e823b..e7097c40 100644 --- a/R/list-modify.R +++ b/R/list-modify.R @@ -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 From 43b44f56aa1bf512c7b408a29b0fe8c64e66fd3c Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 15 Jul 2024 15:05:27 -0500 Subject: [PATCH 2/2] Re-document() --- man/list_assign.Rd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/list_assign.Rd b/man/list_assign.Rd index 5e0d3a95..20676e6e 100644 --- a/man/list_assign.Rd +++ b/man/list_assign.Rd @@ -47,12 +47,13 @@ str(x) # 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