From c168835260f4db742b8f7aa9a07e17f7dfb09dd6 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 21 Mar 2022 10:57:16 -0500 Subject: [PATCH] Adjust .value sentinel explanation --- data-tidy.Rmd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data-tidy.Rmd b/data-tidy.Rmd index 4c1f375..134ea05 100644 --- a/data-tidy.Rmd +++ b/data-tidy.Rmd @@ -334,10 +334,9 @@ household ``` This dataset contains data about five families, with the names and dates of birth of up to two children. -The new challenge in this dataset is that the column names contain both the name of variable (`dob`, `name)` and the value of a variable (`child1`, `child2`). -We again we need to supply a vector to `names_to` but this time we use the special `".value"`[^data-tidy-1] to indicate that first component of the column name is in fact a variable name. - -[^data-tidy-1]: Calling this `.value` instead of `.variable` seems confusing so I think we'll change it: +The new challenge in this dataset is that the column names contain the name of two variables (`dob`, `name)` and the values of another (`child,` with values 1 and 2). +We again we need to supply a vector to `names_to` but this time we use the special `".value"` sentinel. +This overrides the usual `values_to` argument and keeps the first component of the column name as a variable name. ```{r} household |>