You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quarto supports inline code using the backtick operator [1], using backticks and curly quotes to specify the engine. Because of this, `{{ }}` is apparently parsed as inline code and renders as `{ }`. An extra level of curly braces must be added to display the embracing operator in the text.
[1]: https://quarto.org/docs/computations/inline-code.html
Copy file name to clipboardExpand all lines: functions.qmd
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -351,7 +351,7 @@ But you'll often also repeat the verbs themselves, particularly within a large p
351
351
When you notice yourself copying and pasting multiple verbs multiple times, you might think about writing a data frame function.
352
352
Data frame functions work like dplyr verbs: they take a data frame as the first argument, some extra arguments that say what to do with it, and return a data frame or a vector.
353
353
354
-
To let you write a function that uses dplyr verbs, we'll first introduce you to the challenge of indirection and how you can overcome it with embracing, `{{}}`.
354
+
To let you write a function that uses dplyr verbs, we'll first introduce you to the challenge of indirection and how you can overcome it with embracing, `{{{ }}}`.
355
355
With this theory under your belt, we'll then show you a bunch of examples to illustrate what you might do with it.
356
356
357
357
### Indirection and tidy evaluation
@@ -398,11 +398,11 @@ The downside of tidy evaluation comes when we want to wrap up repeated tidyverse
398
398
Here we need some way to tell `group_by()` and `summarize()` not to treat `group_var` and `mean_var` as the name of the variables, but instead look inside them for the variable we actually want to use.
399
399
400
400
Tidy evaluation includes a solution to this problem called **embracing** 🤗.
401
-
Embracing a variable means to wrap it in braces so (e.g.) `var` becomes `{{ var }}`.
401
+
Embracing a variable means to wrap it in braces so (e.g.) `var` becomes `{{{ var }}}`.
402
402
Embracing a variable tells dplyr to use the value stored inside the argument, not the argument as the literal variable name.
403
-
One way to remember what's happening is to think of `{{ }}` as looking down a tunnel --- `{{ var }}` will make a dplyr function look inside of `var` rather than looking for a variable called `var`.
403
+
One way to remember what's happening is to think of `{{{ }}}` as looking down a tunnel --- `{{{ var }}}` will make a dplyr function look inside of `var` rather than looking for a variable called `var`.
404
404
405
-
So to make `grouped_mean()` work, we need to surround `group_var` and `mean_var` with `{{}}`:
405
+
So to make `grouped_mean()` work, we need to surround `group_var` and `mean_var` with `{{{ }}}`:
0 commit comments