Skip to content

Commit cde9043

Browse files
osenanm7pr
andauthored
Update R/qenv-within.R
Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com> Signed-off-by: Oriol Senan <35930244+osenan@users.noreply.github.com>
1 parent 96c49f6 commit cde9043

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

R/qenv-within.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
#' `within()` is a convenience method that wraps `eval_code` to provide a simplified way of passing expression.
44
#' `within` accepts only inline expressions (both simple and compound) and allows to substitute `expr`
55
#' with `...` named argument values.
6-
#' Functions that trigger side effects like `options` or `set.seed` cannot be linked to specific objects with
7-
#' tag "`# @linksto <object name>`" as expressions ignore comments. This is relevant when we want
8-
#' to reproduce the code with
9-
#' function `get_code`. For such scenarios, we recommend to use `eval_code` instead.
6+
#' Functions that trigger side effects like `options` or `set.seed` can be linked to specific objects for further code retrieval (with `get_code`), but only through `eval_code` where code input as `character`. `within` works on `expressions` that do not preserve comments, hence you can not use `# @linksto` tag explained in `get_code`.
107
#'
118
#' @section Using language objects with `within`:
129
#' Passing language objects to `expr` is generally not intended but can be achieved with `do.call`.

0 commit comments

Comments
 (0)