Skip to content

Commit

Permalink
add slicing characteristic
Browse files Browse the repository at this point in the history
adjust vignette to qenv details
  • Loading branch information
gogonzo committed Dec 19, 2024
1 parent ecb3241 commit 3ec91a1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions R/qenv-constructor.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#' - `qenv` is a locked environment, and data modification is only possible through the [eval_code()]
#' and [within.qenv()] functions.
#' - It stores metadata about the code used to create the data (see [get_code()]).
#' - It supports slicing (see [`subset-qenv`])
#' - Is immutable which means that each code evaluation does not modify the original `qenv`
#' environment directly. See the following code:
#'
Expand Down
4 changes: 2 additions & 2 deletions R/qenv-extract.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Subset `qenv`
#' Subsets `qenv`
#'
#' @description
#' Subsets [`qenv`] environment and limits the code to the necessary needed to build limited objects.
Expand All @@ -8,7 +8,7 @@
#' are skipped.
#' @param ... internal usage, please ignore.
#'
#' @name extract-qenv
#' @name subset-qenv
#'
#' @examples
#' q <- qenv()
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ reference:
- title: "Reproducible qenv objects"
desc: "methods to get and modify values of qenv objects"
contents:
- extract-qenv
- concat
- dev_suppress
- eval_code
Expand All @@ -38,4 +37,5 @@ reference:
- join
- qenv
- show,qenv-method
- subset-qenv
- within.qenv
1 change: 1 addition & 0 deletions man/qenv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/extract-qenv.Rd → man/subset-qenv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions vignettes/qenv.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ vignette: >

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

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

### Initialization

Expand Down

0 comments on commit 3ec91a1

Please sign in to comment.