Skip to content

Commit bb5c5fb

Browse files
averissimogogonzo
andauthored
Apply suggestions from code review
Co-authored-by: Dawid Kałędkowski <[email protected]> Signed-off-by: André Veríssimo <[email protected]>
1 parent 9049379 commit bb5c5fb

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

R/qenv-constructor.R

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,14 @@
1616
#'
1717
#' @section Environment:
1818
#'
19-
#' The `qenv` object behaves as an environment that is locked and can be used as
20-
#' as a argument to with many functions that accept `environment`, among the
21-
#' most relevant are: `names()`, `ls()`, `get()`, `exists()`, `parent.env()`,
22-
#' `{l,s,v}apply` family, `local`, `as.environment()`, `is.environment()`, `as.list()`, ...
23-
#'
24-
#' `qenv` should not be used with `cbind()` and `env.profile()` functions as it
25-
#' has unexpected behavior.
26-
#' Instead, `get_env()` or `as.environment()` should be used before calling any
27-
#' problematic function.
28-
#'
29-
#' Similarly, `rlang` functions related to environments cannot be used directly
30-
#' with `qenv` and should be used with `teal.code::get_env()`/`as.environment()`.
31-
#'
32-
#' ```r
33-
#' q <- qenv()
34-
#' rlang::env_clone(as.environment(q))
35-
#' rlang::env_clone(get_env(q))
36-
#' ```
19+
#' The `qenv` object behaves like an environment that is locked and one can use
20+
#' some of the `base` functions dedicated to the `environment`. List of supported
21+
#' functions includes:
22+
#' `names()`, `ls()`, `get()`, `exists()`, `parent.env()`, `lapply`, `sapply`
23+
#' `vapply`, `local`, `as.environment()`, `is.environment()`, `as.list()`, ...
24+
#' We don't recommend using any function outside of the `teal.code` exports and these
25+
#' mentioned above.
26+
#'
3727
#'
3828
#' @name qenv
3929
#'

0 commit comments

Comments
 (0)