Skip to content

Commit 709efeb

Browse files
committed
address feedback from Michael review
1 parent a86545e commit 709efeb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vignettes/datatable-programming.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ In case of any doubts on the `env` interface functioning, set `verbose = TRUE` t
391391

392392
### Use `env` argument from inside another function
393393

394-
It was a design decision that `env` argument will follow _Standard Evaluation_ rules. As a result, it does not require any special handling when being used from inside another function. As well it does not recognize data.table's `.()` alias for a `list()`.
394+
It was a design decision that `env` argument will follow _Standard Evaluation_ rules. Therefore values passed to `env` are evaluated in their orignal scope as is. For more info on the topic see [R Language manual: Computing on the language](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Computing-on-the-language)). As a result, **using `env` argument from function does not require any special handling**. It also means that `.()` alias for a `list()` will not work: `env = .(.col="Petal.Length")`; and `env = list(.col="Petal.Length")` must be used.
395395

396396
```{r env_se}
397397
fun = function(x, col.mean) {
@@ -401,9 +401,9 @@ fun = function(x, col.mean) {
401401
fun(DT, col.mean="Petal.Length")
402402
```
403403

404-
If the outer function itself follows NSE (Non-Standard Evaluation) rules, then it has to resolve language objects the same way as when passing it's arguments to any other function.
404+
If the outer function itself follows NSE (Non-Standard Evaluation) rules, then it has to resolve language objects the same way as when passing its arguments to any other SE function.
405405

406-
```{r nse}
406+
```{r env_se}
407407
fun = function(x, col.mean) {
408408
col.mean = substitute(col.mean)
409409
stopifnot(is.name(col.mean), is.data.table(x))

0 commit comments

Comments
 (0)