Skip to content

Commit

Permalink
Fix small recode error
Browse files Browse the repository at this point in the history
  • Loading branch information
Cghlewis committed Mar 18, 2024
1 parent f0e9437 commit 2abffe4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions recode-values/recode-values-dictionary.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Recode values using a named vector"
title: "Recode values using a long formatted data dictionary"
output:
html_document:
toc: false
Expand Down Expand Up @@ -65,7 +65,7 @@ dict_org <- dict_org %>%
```

We can now use the named vector to recode our values. We can use `!!!` !!! to splice a our vector into the argument of a quoting expression.
We can now use the named vector to recode our values. We can use `!!!` to splice a our vector into the argument of a quoting expression.

```{r}
Expand Down
9 changes: 5 additions & 4 deletions recode-values/recode-values-dictionary.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



<title>Recode values using a named vector</title>
<title>Recode values using a long formatted data dictionary</title>

<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
Expand Down Expand Up @@ -361,7 +361,8 @@



<h1 class="title toc-ignore">Recode values using a named vector</h1>
<h1 class="title toc-ignore">Recode values using a long formatted data
dictionary</h1>

</div>

Expand Down Expand Up @@ -405,8 +406,8 @@ <h4>Function: <code>recode()</code></h4>
dplyr::filter(!is.na(new_value)) %&gt;%
tibble::deframe()</code></pre>
<p>We can now use the named vector to recode our values. We can use
<code>!!!</code> !!! to splice a our vector into the argument of a
quoting expression.</p>
<code>!!!</code> to splice a our vector into the argument of a quoting
expression.</p>
<pre class="r"><code>d23 %&gt;%
dplyr::mutate(org_name = dplyr::recode(org_name, !!!dict_org))</code></pre>
<pre><code># A tibble: 4 x 3
Expand Down

0 comments on commit 2abffe4

Please sign in to comment.