Skip to content

Commit 3ec91a1

Browse files
committed
add slicing characteristic
adjust vignette to qenv details
1 parent ecb3241 commit 3ec91a1

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

R/qenv-constructor.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#' - `qenv` is a locked environment, and data modification is only possible through the [eval_code()]
1414
#' and [within.qenv()] functions.
1515
#' - It stores metadata about the code used to create the data (see [get_code()]).
16+
#' - It supports slicing (see [`subset-qenv`])
1617
#' - Is immutable which means that each code evaluation does not modify the original `qenv`
1718
#' environment directly. See the following code:
1819
#'

R/qenv-extract.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Subset `qenv`
1+
#' Subsets `qenv`
22
#'
33
#' @description
44
#' Subsets [`qenv`] environment and limits the code to the necessary needed to build limited objects.
@@ -8,7 +8,7 @@
88
#' are skipped.
99
#' @param ... internal usage, please ignore.
1010
#'
11-
#' @name extract-qenv
11+
#' @name subset-qenv
1212
#'
1313
#' @examples
1414
#' q <- qenv()

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ reference:
2626
- title: "Reproducible qenv objects"
2727
desc: "methods to get and modify values of qenv objects"
2828
contents:
29-
- extract-qenv
3029
- concat
3130
- dev_suppress
3231
- eval_code
@@ -38,4 +37,5 @@ reference:
3837
- join
3938
- qenv
4039
- show,qenv-method
40+
- subset-qenv
4141
- within.qenv

man/qenv.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/extract-qenv.Rd renamed to man/subset-qenv.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/qenv.Rmd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ vignette: >
1212

1313
A `qenv` inherits from the `environment` class, behaves like an environment, and has the following characteristics:
1414

15-
- The environment is locked, and data modification is only possible through the `eval_code()` and `within()` functions.
16-
- It stores metadata about the code used to create the data.
17-
- Is immutable which means that each code evaluation does not modify the original `qenv` object directly.
15+
- It inherits from the environment and methods such as `$`, `get`, `ls`, `as.list()` work out of the box.
16+
- `qenv` is a locked environment, and data modification is only possible through the `eval_code` and `within` functions.
17+
- It stores metadata about the code used to create the data (see `get_code`).
18+
- It supports slicing by `[`.
19+
- Is immutable which means that each code evaluation does not modify the original `qenv` environment directly.
1820

1921
### Initialization
2022

0 commit comments

Comments
 (0)