diff --git a/R/qenv-constructor.R b/R/qenv-constructor.R index 539a9629..8a1b3ffe 100644 --- a/R/qenv-constructor.R +++ b/R/qenv-constructor.R @@ -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: #' diff --git a/R/qenv-extract.R b/R/qenv-extract.R index 2f2385d1..48c63d2a 100644 --- a/R/qenv-extract.R +++ b/R/qenv-extract.R @@ -1,4 +1,4 @@ -#' Subset `qenv` +#' Subsets `qenv` #' #' @description #' Subsets [`qenv`] environment and limits the code to the necessary needed to build limited objects. @@ -8,7 +8,7 @@ #' are skipped. #' @param ... internal usage, please ignore. #' -#' @name extract-qenv +#' @name subset-qenv #' #' @examples #' q <- qenv() diff --git a/_pkgdown.yml b/_pkgdown.yml index 64d330f6..e4a8c973 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -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 @@ -38,4 +37,5 @@ reference: - join - qenv - show,qenv-method + - subset-qenv - within.qenv diff --git a/man/qenv.Rd b/man/qenv.Rd index 96dc7176..8bc07a99 100644 --- a/man/qenv.Rd +++ b/man/qenv.Rd @@ -22,6 +22,7 @@ Instantiates a \code{qenv} environment. \item \code{qenv} is a locked environment, and data modification is only possible through the \code{\link[=eval_code]{eval_code()}} and \code{\link[=within.qenv]{within.qenv()}} functions. \item It stores metadata about the code used to create the data (see \code{\link[=get_code]{get_code()}}). +\item It supports slicing (see \code{\link{subset-qenv}}) \item Is immutable which means that each code evaluation does not modify the original \code{qenv} environment directly. See the following code: diff --git a/man/extract-qenv.Rd b/man/subset-qenv.Rd similarity index 89% rename from man/extract-qenv.Rd rename to man/subset-qenv.Rd index 9ecf1037..8ae6b2ff 100644 --- a/man/extract-qenv.Rd +++ b/man/subset-qenv.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/qenv-extract.R -\name{extract-qenv} -\alias{extract-qenv} +\name{subset-qenv} +\alias{subset-qenv} \alias{[.qenv} -\title{Subset \code{qenv}} +\title{Subsets \code{qenv}} \usage{ \method{[}{qenv}(x, names, ...) } diff --git a/vignettes/qenv.Rmd b/vignettes/qenv.Rmd index e2493fb4..314a88ff 100644 --- a/vignettes/qenv.Rmd +++ b/vignettes/qenv.Rmd @@ -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