From 6b90ffda93e3f99dd0d4234f8656c6f360b42639 Mon Sep 17 00:00:00 2001 From: Mitsuo Shiota <48662507+mitsuoxv@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:11:21 +0900 Subject: [PATCH] It is natural to use the same function as the previous code chunk. (#1492) --- iteration.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iteration.qmd b/iteration.qmd index 1fc133a..9c05c19 100644 --- a/iteration.qmd +++ b/iteration.qmd @@ -261,7 +261,7 @@ If you'd like to instead create new columns, you can use the `.names` argument t ```{r} df_miss |> mutate( - across(a:d, \(x) abs(x), .names = "{.col}_abs") + across(a:d, \(x) coalesce(x, 0), .names = "{.col}_na_zero") ) ```