Skip to content

Commit 51af9ca

Browse files
committed
edit
1 parent f5226ec commit 51af9ca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

extras/bquote.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ OLDVAR <- as.name("x")
563563

564564
A `dplyr` that allows `:=` to denote assignment does not need an extension package such as `gtools`, `lazyeval`, `wrapr`, or `rlang`; `base::bquote()` is already able to do the work.
565565

566-
`rlang` can also work with packages that it has not been integrated with, as [the linear modeling example](http://www.win-vector.com/blog/2018/09/r-tip-how-to-pass-a-formula-to-lm/) demonstrates. We repeat a simplified such example here (example from an `rlang` package author):
566+
`rlang` can also work with packages that it has not been integrated with, as [the linear modeling example](http://www.win-vector.com/blog/2018/09/r-tip-how-to-pass-a-formula-to-lm/) demonstrates. We repeat a simplified such example here (example shared by an `rlang` package author recently):
567567

568568
```{r lmrlang, warning=FALSE, message=FALSE}
569569
library("rlang")
@@ -591,7 +591,7 @@ eval(bquote( lm(.(f), data = dataf) ))
591591

592592
We are assuming the difference is much finer control of environments (the `expr()` object being of `class` `call` and not carrying an `environment`, and `quo()` object being of class `quosuer` and carrying an `environment`). However the `bquote()` object is of `class` `call` (without an environment) and the function `eval()` does take an environment argument, so with some care it is quite possible to reasonably control environments when using `bquote()`.
593593

594-
The following (an expression of the form "`a - a`" that evaluates to a non-zero value) would be hard to write with `bquote()`.
594+
`rlang` environment control is powerful, for example the following (an expression of the form "`a - a`" that evaluates to a non-zero value) would be hard to write with `bquote()`.
595595

596596
```{r aminusa}
597597
library("rlang")

extras/bquote.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ OLDVAR <- as.name("x")
693693

694694
A `dplyr` that allows `:=` to denote assignment does not need an extension package such as `gtools`, `lazyeval`, `wrapr`, or `rlang`; `base::bquote()` is already able to do the work.
695695

696-
`rlang` can also work with packages that it has not been integrated with, as [the linear modeling example](http://www.win-vector.com/blog/2018/09/r-tip-how-to-pass-a-formula-to-lm/) demonstrates. We repeat a simplified such example here (example from an `rlang` package author):
696+
`rlang` can also work with packages that it has not been integrated with, as [the linear modeling example](http://www.win-vector.com/blog/2018/09/r-tip-how-to-pass-a-formula-to-lm/) demonstrates. We repeat a simplified such example here (example shared by an `rlang` package author recently):
697697

698698
``` r
699699
library("rlang")
@@ -745,7 +745,7 @@ eval(bquote( lm(.(f), data = dataf) ))
745745

746746
We are assuming the difference is much finer control of environments (the `expr()` object being of `class` `call` and not carrying an `environment`, and `quo()` object being of class `quosuer` and carrying an `environment`). However the `bquote()` object is of `class` `call` (without an environment) and the function `eval()` does take an environment argument, so with some care it is quite possible to reasonably control environments when using `bquote()`.
747747

748-
The following (an expression of the form "`a - a`" that evaluates to a non-zero value) would be hard to write with `bquote()`.
748+
`rlang` environment control is powerful, for example the following (an expression of the form "`a - a`" that evaluates to a non-zero value) would be hard to write with `bquote()`.
749749

750750
``` r
751751
library("rlang")

0 commit comments

Comments
 (0)