diff --git a/main/404.html b/main/404.html index 5ac00ffe..481f6a63 100644 --- a/main/404.html +++ b/main/404.html @@ -1,5 +1,4 @@ - - + @@ -48,7 +47,22 @@
  • Non-CRAN unit test report
  • - +
    + + @@ -46,65 +84,80 @@

    Contributor Covenant Code of Conduct

    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -112,17 +165,19 @@

    Attribution

    + + - + + - + + diff --git a/main/CONTRIBUTING.html b/main/CONTRIBUTING.html index c31bd9db..a8142a7b 100644 --- a/main/CONTRIBUTING.html +++ b/main/CONTRIBUTING.html @@ -1,5 +1,19 @@ - -Contribution Guidelines • teal.code + + + + + + +Contribution Guidelines • teal.code + + + + + + + + + Skip to contents @@ -15,23 +29,47 @@ + + @@ -48,7 +86,8 @@

    Contribution Guidelines

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -59,38 +98,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -104,76 +152,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    - +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + - + + - + + diff --git a/main/LICENSE-text.html b/main/LICENSE-text.html index 8c26dfae..f4bcf3ef 100644 --- a/main/LICENSE-text.html +++ b/main/LICENSE-text.html @@ -1,5 +1,19 @@ - -License • teal.code + + + + + + +License • teal.code + + + + + + + + + Skip to contents @@ -15,23 +29,47 @@ + + @@ -58,17 +96,19 @@

    License

    limitations under the License. - + + - + + - + + diff --git a/main/SECURITY.html b/main/SECURITY.html index 7948f6a7..31985dcd 100644 --- a/main/SECURITY.html +++ b/main/SECURITY.html @@ -1,5 +1,19 @@ - -Security Policy • teal.code + + + + + + +Security Policy • teal.code + + + + + + + + + Skip to contents @@ -15,23 +29,47 @@ + + @@ -46,38 +84,44 @@

    Security Policy

    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    - +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + - + + - + + diff --git a/main/articles/index.html b/main/articles/index.html index 19c7dfe8..e27da54c 100644 --- a/main/articles/index.html +++ b/main/articles/index.html @@ -1,5 +1,19 @@ - -Articles • teal.code + + + + + + +Articles • teal.code + + + + + + + + + Skip to contents @@ -15,23 +29,47 @@ + + @@ -46,22 +84,28 @@

    Articles

    All vignettes

    -
    qenv
    +
    +
    qenv
    -
    Reproducibility
    + +
    Reproducibility
    -
    - + +
    + + + - + + - + + diff --git a/main/articles/qenv.html b/main/articles/qenv.html index b8d76dd6..0bd87638 100644 --- a/main/articles/qenv.html +++ b/main/articles/qenv.html @@ -1,5 +1,4 @@ - - + @@ -48,7 +47,22 @@
  • Non-CRAN unit test report
  • - +
    + - +
    + + @@ -45,7 +83,8 @@

    Authors and Citation

    Authors

    -
    + +

    Citation

    @@ -115,17 +155,19 @@

    Citation

    + + - + + - + + diff --git a/main/index.html b/main/index.html index 3f6175f3..fe86335a 100644 --- a/main/index.html +++ b/main/index.html @@ -1,5 +1,4 @@ - - + @@ -50,7 +49,22 @@
  • Non-CRAN unit test report
  • - +
    + + @@ -44,111 +82,162 @@

    Changelog

    -

    teal.code 0.5.0.9015

    +

    teal.code 0.5.0.9015 +

    -

    Enhancements

    -
    + +
    -

    teal.code 0.5.0

    CRAN release: 2024-01-11

    +

    teal.code 0.5.0 +

    +

    CRAN release: 2024-01-11

    -

    Breaking Change

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal.code 0.4.1

    CRAN release: 2023-09-12

    +

    teal.code 0.4.1 +

    +

    CRAN release: 2023-09-12

    -

    Miscellaneous

    -
    + +
    -

    teal.code 0.4.0

    +

    teal.code 0.4.0 +

    -

    Breaking Change

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal.code 0.3.0

    +

    teal.code 0.3.0 +

    -

    Major breaking change

    -
    + +
    -

    New features

    -
    +

    New features +

    + +
    -

    teal.code 0.2.0

    +

    teal.code 0.2.0 +

    -

    Miscellaneous

    -
    +

    Miscellaneous +

    + +
    -

    teal.code 0.1.1

    +

    teal.code 0.1.1 +

    -

    Enhancements

    -
    + +
    -

    Miscellaneous

    -
    + +
    -

    teal.code 0.1.0

    -
    +

    teal.code 0.1.0 +

    + + + + - + + - + + diff --git a/main/reference/concat.html b/main/reference/concat.html index fdd3c709..2c07559c 100644 --- a/main/reference/concat.html +++ b/main/reference/concat.html @@ -1,5 +1,21 @@ - -Concatenate two qenv objects — concat • teal.code + + + + + + +Concatenate two qenv objects — concat • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,35 +89,44 @@

    Concatenate two qenv objects

    -

    Usage

    +

    Usage +

    concat(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (qenv)

    -
    y
    +
    y +

    (qenv)

    -
    + +
    -

    Value

    +

    Value +

    qenv object.

    -

    Details

    +

    Details +

    We recommend to use the join method to have a stricter control in case x and y contain duplicated bindings and code. RHS argument content has priority over the LHS one.

    -

    Examples

    +

    Examples +

    q <- qenv()
     q1 <- eval_code(q, expression(iris1 <- iris, mtcars1 <- mtcars))
     q2 <- q1
    @@ -90,17 +139,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/dev_suppress.html b/main/reference/dev_suppress.html index 5579c832..bfd521b2 100644 --- a/main/reference/dev_suppress.html +++ b/main/reference/dev_suppress.html @@ -1,9 +1,25 @@ - -Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress • teal.code + + + + + +Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress • teal.code + + + + + + + +directly in the IDE."> + + + + Skip to contents @@ -19,23 +35,47 @@ + + @@ -55,24 +95,31 @@

    Suppresses plot display in the IDE by opening a PDF graphics device

    -

    Usage

    +

    Usage +

    dev_suppress(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    lazy binding which generates the plot(s)

    -
    + +
    -

    Value

    +

    Value +

    No return value, called for side effects.

    -

    Details

    +

    Details +

    The function uses base::on.exit to ensure that the PDF graphics device is closed (using grDevices::dev.off) when the function exits, regardless of whether it exits normally or due to an error. This is necessary to @@ -80,22 +127,25 @@

    Details
    -

    Examples

    +

    Examples +

    dev_suppress(plot(1:10))
     

    + + - + + - + + diff --git a/main/reference/dot-check_joinable.html b/main/reference/dot-check_joinable.html index 89b2f7a6..9554d85d 100644 --- a/main/reference/dot-check_joinable.html +++ b/main/reference/dot-check_joinable.html @@ -1,7 +1,23 @@ - -If two qenv can be joined — .check_joinable • teal.code + + + + + + +If two qenv can be joined — .check_joinable • teal.code + + + + + + + + + + + Skip to contents @@ -17,23 +33,47 @@ + + @@ -52,39 +92,48 @@

    If two qenv can be joined

    -

    Usage

    +

    Usage +

    .check_joinable(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (qenv)

    -
    y
    +
    y +

    (qenv)

    -
    + +
    -

    Value

    +

    Value +

    TRUE if able to join or character used to print error message.

    + + - + + - + + diff --git a/main/reference/get_code_dependency.html b/main/reference/get_code_dependency.html index 0e6b70b3..22b07057 100644 --- a/main/reference/get_code_dependency.html +++ b/main/reference/get_code_dependency.html @@ -1,5 +1,21 @@ - -Get code dependency of an object — get_code_dependency • teal.code + + + + + + +Get code dependency of an object — get_code_dependency • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,33 +89,42 @@

    Get code dependency of an object

    -

    Usage

    +

    Usage +

    get_code_dependency(code, names, check_code_names = TRUE)
    -

    Arguments

    +

    Arguments +

    -
    code
    +
    +
    code +

    character with the code.

    -
    names
    +
    names +

    character vector of object names.

    -
    check_code_names
    +
    check_code_names +

    logical(1) flag specifying if a warning for non-existing names should be displayed.

    -
    + +
    -

    Value

    +

    Value +

    Character vector, a subset of code. Note that subsetting is actually done on the calls code, not necessarily on the elements of the vector.

    -

    Details

    +

    Details +

    Given a character vector with code, this function will extract the part of the code responsible for creating the variables specified by names. This includes the final call that creates the variable(s) in question as well as all parent calls, @@ -89,17 +138,19 @@

    Details

    + + - + + - + + diff --git a/main/reference/get_env.html b/main/reference/get_env.html index a8018523..380f62e4 100644 --- a/main/reference/get_env.html +++ b/main/reference/get_env.html @@ -1,5 +1,21 @@ - -Access environment included in qenv — get_env • teal.code + + + + + + +Access environment included in qenv — get_env • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -39,7 +79,8 @@
    @@ -49,25 +90,32 @@

    Access environment included in qenv

    -

    Usage

    +

    Usage +

    get_env(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (qenv).

    -
    + +
    -

    Value

    +

    Value +

    An environment stored in qenv with all data objects.

    -

    Examples

    +

    Examples +

    q <- qenv()
     q1 <- within(q, {
       a <- 5
    @@ -79,17 +127,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/get_messages.html b/main/reference/get_messages.html index a23e6e5b..ba9a7410 100644 --- a/main/reference/get_messages.html +++ b/main/reference/get_messages.html @@ -1,5 +1,21 @@ - -Get messages from qenv object — get_messages • teal.code + + + + + + +Get messages from qenv object — get_messages • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,25 +89,32 @@

    Get messages from qenv object

    -

    Usage

    +

    Usage +

    get_messages(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (qenv)

    -
    + +
    -

    Value

    +

    Value +

    character containing warning information or NULL if no messages.

    -

    Examples

    +

    Examples +

    data_q <- qenv()
     data_q <- eval_code(data_q, "iris_data <- iris")
     warning_qenv <- eval_code(
    @@ -80,17 +127,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/get_var.html b/main/reference/get_var.html index 269300c6..180afea0 100644 --- a/main/reference/get_var.html +++ b/main/reference/get_var.html @@ -1,9 +1,25 @@ - -Get object from qenv — get_var • teal.code + + + + + +Get object from qenv — get_var • teal.code + + + + + + + +Retrieve variables from the qenv environment."> + + + + Skip to contents @@ -19,23 +35,47 @@ + + @@ -43,7 +83,8 @@
    @@ -55,7 +96,8 @@

    Get object from qenv

    -

    Usage

    +

    Usage +

    get_var(object, var)
     
     # S3 method for class 'qenv.error'
    @@ -63,24 +105,31 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object, x
    +
    +
    object, x +

    (qenv)

    -
    var, i
    +
    var, i +

    (character(1)) variable name.

    -
    + +
    -

    Value

    +

    Value +

    The value of required variable (var) within qenv object.

    -

    Examples

    +

    Examples +

    q <- qenv()
     q1 <- eval_code(q, code = quote(a <- 1))
     q2 <- eval_code(q1, code = "b <- a")
    @@ -92,17 +141,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/get_warn_message_util.html b/main/reference/get_warn_message_util.html index 15be28d8..c552d9c2 100644 --- a/main/reference/get_warn_message_util.html +++ b/main/reference/get_warn_message_util.html @@ -1,5 +1,21 @@ - -Obtain warnings or messages from code slot — get_warn_message_util • teal.code + + + + + + +Obtain warnings or messages from code slot — get_warn_message_util • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,39 +89,48 @@

    Obtain warnings or messages from code slot

    -

    Usage

    +

    Usage +

    get_warn_message_util(object, what)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (qenv)

    -
    what
    +
    what +

    ("warning" or "message")

    -
    + +
    -

    Value

    +

    Value +

    character(1) containing combined message or NULL when no warnings/messages

    + + - + + - + + diff --git a/main/reference/get_warnings.html b/main/reference/get_warnings.html index bbf9073a..33d488ea 100644 --- a/main/reference/get_warnings.html +++ b/main/reference/get_warnings.html @@ -1,5 +1,21 @@ - -Get warnings from qenv object — get_warnings • teal.code + + + + + + +Get warnings from qenv object — get_warnings • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,25 +89,32 @@

    Get warnings from qenv object

    -

    Usage

    +

    Usage +

    get_warnings(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (qenv)

    -
    + +
    -

    Value

    +

    Value +

    character containing warning information or NULL if no warnings.

    -

    Examples

    +

    Examples +

    data_q <- qenv()
     data_q <- eval_code(data_q, "iris_data <- iris")
     warning_qenv <- eval_code(
    @@ -90,17 +137,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/index.html b/main/reference/index.html index d7b827b4..3e4f9f1f 100644 --- a/main/reference/index.html +++ b/main/reference/index.html @@ -1,5 +1,19 @@ - -Package index • teal.code + + + + + + +Package index • teal.code + + + + + + + + + Skip to contents @@ -15,23 +29,47 @@ + + @@ -43,82 +81,106 @@

    Package index

    -

    Reproducible qenv objects

    +

    Reproducible qenv objects +

    methods to get and modify values of qenv objects

    -
    +
    +
    -
    +
    +
    concat()
    Concatenate two qenv objects
    -
    +
    +
    +
    dev_suppress()
    Suppresses plot display in the IDE by opening a PDF graphics device
    -
    +
    +
    +
    qenv() eval_code() `[`(<qenv>) get_code() within(<qenv>) stable
    Code tracking with qenv object
    -
    +
    +
    +
    get_env()
    -
    Access environment included in qenv
    -
    +
    Access environment included in qenv +
    +
    +
    +
    get_var() `[[`(<qenv.error>) deprecated
    -
    Get object from qenv
    -
    +
    Get object from qenv +
    +
    +
    +
    get_messages()
    Get messages from qenv object
    -
    +
    +
    +
    get_warnings()
    Get warnings from qenv object
    -
    +
    +
    +
    c(<qenv>) c(<qenv.error>) join()
    Join qenv objects
    -
    +
    +
    +
    show(<qenv>)
    Display qenv object
    -
    - + + + + - + + - + + diff --git a/main/reference/join.html b/main/reference/join.html index 9a2d17ac..46a50242 100644 --- a/main/reference/join.html +++ b/main/reference/join.html @@ -1,7 +1,23 @@ - -Join qenv objects — c.qenv • teal.code + + + + + + +Join qenv objects — c.qenv • teal.code + + + + + + + + + + + Skip to contents @@ -17,23 +33,47 @@ + + @@ -52,7 +92,8 @@

    Join qenv objects

    -

    Usage

    +

    Usage +

    # S3 method for class 'qenv'
     c(...)
     
    @@ -63,44 +104,63 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    ...
    +
    +
    ... +

    (qenv or qenv.error).

    -
    x
    +
    x +

    (qenv)

    -
    y
    +
    y +

    (qenv)

    -
    + +
    -

    Value

    +

    Value +

    qenv object.

    -

    Details

    +

    Details +

    Any common code at the start of the qenvs is only placed once at the start of the joined qenv. This allows consistent behavior when joining qenvs which share a common ancestor. See below for an example.

    -

    There are some situations where join() cannot be properly performed, such as these three scenarios:

    1. Both qenv objects contain an object of the same name but are not identical.

      +

      There are some situations where join() cannot be properly performed, such as these three scenarios:

      +
        +
      1. +

        Both qenv objects contain an object of the same name but are not identical.

        Example:

        -

        x <- eval_code(qenv(), expression(mtcars1 <- mtcars))
        +

        +
        +
        x <- eval_code(qenv(), expression(mtcars1 <- mtcars))
         y <- eval_code(qenv(), expression(mtcars1 <- mtcars['wt']))
         
         z <- c(x, y)
        -# Error message will occur

        +# Error message will occur
        +

        +

        In this example, mtcars1 object exists in both x and y objects but the content are not identical. -mtcars1 in the x qenv object has more columns than mtcars1 in the y qenv object (only has one column).

      2. -
      3. join() will look for identical code elements in both qenv objects. +mtcars1 in the x qenv object has more columns than mtcars1 in the y qenv object (only has one column).

        +
      4. +
      5. +

        join() will look for identical code elements in both qenv objects. The index position of these code elements must be the same to determine the evaluation order. Otherwise, join() will throw an error message.

        Example:

        -

        common_q <- eval_code(qenv(), expression(v <- 1))
        +

        +
        +
        common_q <- eval_code(qenv(), expression(v <- 1))
         x <- eval_code(
           common_q,
           "x <- v"
        @@ -117,11 +177,17 @@ 

        Detailsjoin_q <- c(q, z) # Error message will occur -# Check the order of evaluation based on the id slot

        -

        The error occurs because the index position of common code elements in the two objects is not the same.

      6. -
      7. The usage of temporary variable in the code expression could cause join() to fail.

        +# Check the order of evaluation based on the id slot
        +

        +
    +

    The error occurs because the index position of common code elements in the two objects is not the same.

    + +
  • +

    The usage of temporary variable in the code expression could cause join() to fail.

    Example:

    -

    common_q <- qenv()
    +

    +
    +
    common_q <- qenv()
     x <- eval_code(
       common_q,
       "x <- numeric(0)
    @@ -141,11 +207,15 @@ 

    Details # Check the value of temporary variable i in both objects x$i # Output: 2 -y$i # Output: 3

    +y$i # Output: 3
    +

    +

    c() fails to provide a proper result because of the temporary variable i exists in both objects but has different value. To fix this, we can set i <- NULL in the code expression for both objects.

    -

    common_q <- qenv()
    +

    +
    +
    common_q <- qenv()
     x <- eval_code(
       common_q,
       "x <- numeric(0)
    @@ -164,11 +234,16 @@ 

    Details # dummy i variable to fix it i <- NULL" ) -q <- c(x,y)

  • - +q <- c(x,y) +

    + + + +
    -

    Examples

    +

    Examples +

    q <- qenv()
     q1 <- within(q, {
       iris1 <- iris
    @@ -210,17 +285,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/lang2calls.html b/main/reference/lang2calls.html index 81cd6e0b..5abb1147 100644 --- a/main/reference/lang2calls.html +++ b/main/reference/lang2calls.html @@ -1,5 +1,21 @@ - -Separate calls — lang2calls • teal.code + + + + + + +Separate calls — lang2calls • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,26 +89,33 @@

    Separate calls

    -

    Usage

    +

    Usage +

    lang2calls(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    language object or a list of thereof

    -
    + +
    -

    Value

    +

    Value +

    Given a call, an expression, a list of calls or a list of expressions, returns a list of calls. Symbols and atomic vectors (which may get mixed up in a list) are returned wrapped in list.

    -

    Examples

    +

    Examples +

    # use non-exported function from teal.code
     lang2calls <- getFromNamespace("lang2calls", "teal.code")
     expr <- expression(
    @@ -85,17 +132,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/qenv-class.html b/main/reference/qenv-class.html index 9a0bba3e..443bfb8e 100644 --- a/main/reference/qenv-class.html +++ b/main/reference/qenv-class.html @@ -1,5 +1,21 @@ - -Reproducible class with environment and code — qenv-class • teal.code + + + + + + +Reproducible class with environment and code — qenv-class • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -50,10 +90,12 @@

    Reproducible class with environment and code

    -

    Slots

    +

    Slots +

    -
    .xData
    +
    +
    .xData

    (environment) environment with content was generated by the evaluation

    @@ -63,31 +105,38 @@

    Slots

    code
    slot.

    -
    + +
    -

    Code

    +

    Code +

    -

    Each code element is a character representing one call. Each element has possible attributes:

    • warnings (character) the warnings output when evaluating the code element

    • +

      Each code element is a character representing one call. Each element has possible attributes:

      +
        +
      • warnings (character) the warnings output when evaluating the code element

      • messages (character) the messages output when evaluating the code element

      • id (integer`) random identifier of the code element to make sure uniqueness when joining

      • dependency (character) names of objects that appear in this call and gets affected by this call, separated by <- (objects on LHS of <- are affected by this line, and objects on RHS are affecting this line)

      • -
    + + + + - + + - + + diff --git a/main/reference/qenv.html b/main/reference/qenv.html index d265b994..c5f402f7 100644 --- a/main/reference/qenv.html +++ b/main/reference/qenv.html @@ -1,7 +1,23 @@ - -Code tracking with qenv object — qenv • teal.code + + + + + + +Code tracking with qenv object — qenv • teal.code + + + + + + + + + + + Skip to contents @@ -17,23 +33,47 @@ + + @@ -52,7 +92,8 @@

    Code tracking with qenv object

    -

    Usage

    +

    Usage +

    qenv()
     
     eval_code(object, code)
    @@ -67,47 +108,59 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (qenv)

    -
    code
    +
    code +

    (character, language or expression) code to evaluate. It is possible to preserve original formatting of the code by providing a character or an expression being a result of parse(keep.source = TRUE).

    -
    x
    +
    x +

    (qenv)

    -
    names
    +
    names +

    (character) for x[names], names of objects included in qenv to subset. Names not present in qenv are skipped. For get_code [Experimental] vector of object names to return the code for. For more details see the "Extracting dataset-specific code" section.

    -
    ...
    +
    ... +

    see Details

    -
    deparse
    +
    deparse +

    (logical(1)) flag specifying whether to return code as character or expression.

    -
    data
    +
    data +

    (qenv)

    -
    expr
    +
    expr +

    (expression) to evaluate. Must be inline code, see Using language objects...

    -
    + +
    -

    Value

    +

    Value +

    qenv returns a qenv object.

    eval_code returns a qenv object with expr evaluated or qenv.error if evaluation fails.

    [[, $ and get return the value of the object named name in the qenv object.

    @@ -119,7 +172,8 @@

    Value

    within returns a qenv object with expr evaluated or qenv.error if evaluation fails.

    -

    Details

    +

    Details +

    qenv() instantiates a qenv with an empty environment. Any changes must be made by evaluating code in it with eval_code or within, thereby ensuring reproducibility.

    eval_code() evaluates given code in the qenv environment and appends it to the code slot. @@ -135,14 +189,16 @@

    Detailsname:value pairs are passed to ..., name in expr will be replaced with value.

    -

    Subsetting

    +

    Subsetting +

    x[names] subsets objects in qenv environment and limit the code to the necessary needed to build limited objects. ... passes parameters to further methods.

    -

    Extracting dataset-specific code

    +

    Extracting dataset-specific code +

    When names for get_code is specified, the code returned will be limited to the lines needed to create @@ -151,7 +207,9 @@

    Extracting dataset-specific code?assignOps) but it can fail in some situations.

    Consider the following examples:

    Case 1: Usual assignments.

    -

    q1 <-
    +

    +
    +
    q1 <-
       within(qenv(), {
         foo <- function(x) {
           x + 1
    @@ -159,10 +217,14 @@ 

    Extracting dataset-specific code x <- 0 y <- foo(x) }) -get_code(q1, names = "y")

    +get_code(q1, names = "y")
    +

    +

    x has no dependencies, so get_code(data, names = "x") will return only the second call.
    y depends on x and foo, so get_code(data, names = "y") will contain all three calls.

    Case 2: Some objects are created by a function's side effects.

    -

    q2 <-
    +

    +
    +
    q2 <-
       within(qenv(){
         foo <- function() {
           x <<- x + 1
    @@ -172,14 +234,18 @@ 

    Extracting dataset-specific code

    +
    +

    +

    Here, y depends on x but x is modified by foo as a side effect (not by reassignment) and so get_code(data, names = "y") will not return the foo() call.
    To overcome this limitation, code dependencies can be specified manually. Lines where side effects occur can be flagged by adding "# @linksto <object name>" at the end.
    Note that within evaluates code passed to expr as is and comments are ignored. In order to include comments in code one must use the eval_code function instead.

    -

    q3 <-
    +

    +
    +
    q3 <-
       eval_code(qenv(), "
         foo <- function() {
           x <<- x + 1
    @@ -188,28 +254,36 @@ 

    Extracting dataset-specific code foo() # @linksto x y <- x ") -get_code(q3, names = "y")

    +get_code(q3, names = "y")
    +

    +

    Now the foo() call will be properly included in the code required to recreate y.

    Note that two functions that create objects as side effects, assign and data, are handled automatically.

    -

    Here are known cases where manual tagging is necessary:

    • non-standard assignment operators, e.g. %<>%

    • +

      Here are known cases where manual tagging is necessary:

      +
        +
      • non-standard assignment operators, e.g. %<>%

      • objects used as conditions in if statements: if (<condition>)

      • objects used to iterate over in for loops: for(i in <sequence>)

      • creating and evaluating language objects, e.g. eval(<call>)

      • -

    + +
    -

    Using language objects with within

    +

    Using language objects with within +

    Passing language objects to expr is generally not intended but can be achieved with do.call. Only single expressions will work and substitution is not available. See examples.

    -

    Examples

    +

    Examples +

    # create empty qenv
     qenv()
     #> <environment: 0x565423a10a80> [L]
    @@ -341,17 +415,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/show-qenv-method.html b/main/reference/show-qenv-method.html index a58e5413..ad2912e4 100644 --- a/main/reference/show-qenv-method.html +++ b/main/reference/show-qenv-method.html @@ -1,5 +1,21 @@ - -Display qenv object — show,qenv-method • teal.code + + + + + + +Display qenv object — show,qenv-method • teal.code + + + + + + + + + + + Skip to contents @@ -15,23 +31,47 @@ + + @@ -49,26 +89,33 @@

    Display qenv object

    -

    Usage

    +

    Usage +

    # S4 method for class 'qenv'
     show(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (qenv)

    -
    + +
    -

    Value

    +

    Value +

    object, invisibly.

    -

    Examples

    +

    Examples +

    q <- qenv()
     q1 <- eval_code(q, expression(a <- 5, b <- data.frame(x = 1:10)))
     q1
    @@ -81,17 +128,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/teal.code-package.html b/main/reference/teal.code-package.html index 01b7af1a..809fcfc7 100644 --- a/main/reference/teal.code-package.html +++ b/main/reference/teal.code-package.html @@ -1,9 +1,25 @@ - -teal.code: Code storage and execution class for teal applications — teal.code-package • teal.code + + + + + +teal.code: Code storage and execution class for teal applications — teal.code-package • teal.code + + + + + + + +module which returns code to reproduce application outputs."> + + + + Skip to contents @@ -19,23 +35,47 @@ + + @@ -43,7 +83,8 @@
    @@ -56,16 +97,24 @@

    teal.code: Code storage and execution class for teal applicatio
    -

    Author

    +

    Author +

    Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com

    -

    Authors:

    + +

    + + - + + - + + diff --git a/main/search.json b/main/search.json index b6b14f83..291edc0a 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.code/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.code/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"introduction-to-qenv","dir":"Articles","previous_headings":"","what":"Introduction to qenv","title":"qenv","text":"qenv R object contains code environment can used create reproducible outputs.","code":""},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"initialization","dir":"Articles","previous_headings":"Introduction to qenv","what":"Initialization","title":"qenv","text":"qenv() function serves gateway create initial qenv object:","code":"library(teal.code) # create a new qenv object empty_qenv <- qenv() print(empty_qenv) ## [L] ## Parent: "},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"qenv-basic-usage","dir":"Articles","previous_headings":"Introduction to qenv","what":"qenv basic usage","title":"qenv","text":"eval_code() function executes code within qenv environment, yielding new qenv object output. result can achieved within method qenv class. extract objects qenv, use [[; particularly useful displaying shiny app. can retrieve code used generate qenv using get_code() function.","code":"# evaluate code in qenv my_qenv <- eval_code(empty_qenv, \"x <- 2\") print(my_qenv) ## [L] ## Parent: ## Bindings: ## • x: [L] as.environment(my_qenv) ## q1 <- eval_code(my_qenv, \"y <- x * 2\") q1 <- eval_code(q1, \"z <- y * 2\") # my_qenv still contains only x print(my_qenv) ## [L] ## Parent: ## Bindings: ## • x: [L] names(my_qenv) ## [1] \"x\" # q1 contains x, y and z print(q1) ## [L] ## Parent: ## Bindings: ## • x: [L] ## • y: [L] ## • z: [L] names(q1) ## [1] \"x\" \"y\" \"z\" q2 <- within(my_qenv, y <- x * 2) q2 <- within(q2, z <- y * 2) print(q2) ## [L] ## Parent: ## Bindings: ## • x: [L] ## • y: [L] ## • z: [L] print(q2[[\"y\"]]) ## [1] 4 cat(get_code(q2)) ## x <- 2 ## y <- x * 2 ## z <- y * 2"},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"substitutions","dir":"Articles","previous_headings":"Introduction to qenv","what":"Substitutions","title":"qenv","text":"cases, one may want substitute elements code evaluation. Consider case subset iris defined input value. convenient way pass code substitution use within method. See ?qenv details.","code":"q <- qenv() q <- eval_code(q, quote(i <- subset(iris, Species == \"setosa\"))) q <- eval_code(q, substitute( ii <- subset(iris, Species == species), env = list(species = \"versicolor\") )) input_value <- \"virginica\" q <- eval_code(q, substitute( iii <- subset(iris, Species == species), env = list(species = input_value) )) summary(q[[\"i\"]]$Species) ## setosa versicolor virginica ## 50 0 0 summary(q[[\"ii\"]]$Species) ## setosa versicolor virginica ## 0 50 0 summary(q[[\"iii\"]]$Species) ## setosa versicolor virginica ## 0 0 50 qq <- qenv() qq <- within(qq, i <- subset(iris, Species == \"setosa\")) qq <- within(qq, ii <- subset(iris, Species == species), species = \"versicolor\") input_value <- \"virginica\" qq <- within(qq, iii <- subset(iris, Species == species), species = input_value) summary(qq[[\"i\"]]$Species) ## setosa versicolor virginica ## 50 0 0 summary(qq[[\"ii\"]]$Species) ## setosa versicolor virginica ## 0 50 0 summary(qq[[\"iii\"]]$Species) ## setosa versicolor virginica ## 0 0 50"},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"combining-qenv-objects","dir":"Articles","previous_headings":"Introduction to qenv","what":"Combining qenv objects","title":"qenv","text":"Given pair qenv objects, may able “join” , creating new qenv object encompassing union environments, along requisite code reproduction: feasibility joining qenv objects hinges contents environments code’s order. Refer function documentation details.","code":"common_q <- eval_code(qenv(), quote(x <- 1)) x_q <- eval_code(common_q, quote(y <- 5)) y_q <- eval_code(common_q, quote(z <- 5)) join_q <- c(x_q, y_q) print(join_q) ## ## Parent: ## Bindings: ## • x: ## • y: ## • z: names(join_q) ## [1] \"x\" \"y\" \"z\""},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"warnings-and-messages-in-qenv-objects","dir":"Articles","previous_headings":"Introduction to qenv","what":"Warnings and messages in qenv objects","title":"qenv","text":"cases warnings messages arise evaluating code within qenv environment, captured stored within qenv object. Access messages warnings using returns NULLm warnings messages present.","code":"q_message <- eval_code(qenv(), quote(message(\"this is a message\"))) get_messages(q_message) ## [1] \"~~~ Messages ~~~\\n\\n> this is a message\\nwhen running code:\\nmessage(\\\"this is a message\\\")\\n\\n~~~ Trace ~~~\\n\\nmessage(\\\"this is a message\\\")\" q_warning <- eval_code(qenv(), quote(warning(\"and this is a warning\"))) get_warnings(q_warning) ## [1] \"~~~ Warnings ~~~\\n\\n> and this is a warning\\nwhen running code:\\nwarning(\\\"and this is a warning\\\")\\n\\n~~~ Trace ~~~\\n\\nwarning(\\\"and this is a warning\\\")\""},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"utilizing-qenv-inside-shiny-applications","dir":"Articles","previous_headings":"","what":"Utilizing qenv inside shiny applications","title":"qenv","text":"functions can seamlessly integrated shiny applications produce reproducible outputs. example , rcode section showcases code employed generating output. employing qenv evaluate code, error occur, object type qenv.error generated. object can utilized wherever qenv object used, alleviating need code alterations handle errors. Select error_option example witness qenv error handling action.","code":"library(shiny) # create an initial qenv with the data in data_q <- qenv() data_q <- eval_code(data_q, \"iris_data <- iris\") ui <- fluidPage( radioButtons( \"option\", \"Choose a column to plot:\", c(\"Sepal.Length\", \"Sepal.Width\", \"Petal.Length\", \"Petal.Width\", \"error_option\") ), verbatimTextOutput(\"rcode\"), plotOutput(\"plot\") ) server <- function(input, output, session) { # create a qenv containing the reproducible output output_q <- reactive({ req(input$option) eval_code( data_q, bquote(p <- hist(iris_data[, .(input$option)])) ) }) # display output output$plot <- renderPlot(output_q()[[\"p\"]]) # display code output$rcode <- renderText(get_code(output_q())) } if (interactive()) { shinyApp(ui, server) }"},{"path":"https://insightsengineering.github.io/teal.code/articles/qenv.html","id":"qenv-and-teal-applications","dir":"Articles","previous_headings":"","what":"qenv and teal applications","title":"qenv","text":"versatile qenv object can seamlessly integrate teal modules. Explore teal vignette Creating Custom Modules detailed guidance.","code":""},{"path":"https://insightsengineering.github.io/teal.code/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Aleksander Chlebowski. Author. Marcin Kosinski. Author. Pawel Rucki. Author. Nikolas Burkoff. Author. Mahmoud Hallal. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.code/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Chlebowski , Kosinski M, Rucki P, Burkoff N, Hallal M, Nasinski M, Pagacz K, Zhao J (2024). teal.code: Code Storage Execution Class 'teal' Applications. R package version 0.5.0.9015, https://github.com/insightsengineering/teal.code, https://insightsengineering.github.io/teal.code/.","code":"@Manual{, title = {teal.code: Code Storage and Execution Class for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Pawel Rucki and Nikolas Burkoff and Mahmoud Hallal and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, note = {R package version 0.5.0.9015, https://github.com/insightsengineering/teal.code}, url = {https://insightsengineering.github.io/teal.code/}, }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Code Storage and Execution Class for teal Applications","text":"teal.code R library providing tools store code execution environment associated . features include: qenv class tracking code storing variables integrates well shiny reactive expressions use shiny applications whose outputs require reproducibility (.e. code used application can retrieved rerun) ability chain join qenv objects together provide fine-grained control executed code automatic handling errors warnings encountered executed code","code":""},{"path":"https://insightsengineering.github.io/teal.code/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Code Storage and Execution Class for teal Applications","text":"Alternatively, might want use development version.","code":"# stable versions install.packages('teal.code') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.code\")"},{"path":"https://insightsengineering.github.io/teal.code/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Code Storage and Execution Class for teal Applications","text":"understand use package, please refer Getting Started article, provides multiple examples code implementation. showcase example usage","code":"library(teal.code) my_qenv <- eval_code(qenv(), \"x <- 5\") my_qenv #> [L] #> Parent: #> Bindings: #> • x: [L] as.environment(my_qenv) #> names(my_qenv) #> [1] \"x\" qenv_2 <- eval_code(my_qenv, \"y <- x * 2\") qenv_2 <- eval_code(qenv_2, \"z <- y * 2\") qenv_2 #> [L] #> Parent: #> Bindings: #> • x: [L] #> • y: [L] #> • z: [L] environment(qenv_2) #> names(qenv_2) #> [1] \"x\" \"y\" \"z\" qenv_2[[\"y\"]] #> [1] 10 cat(get_code(qenv_2)) #> x <- 5 #> y <- x * 2 #> z <- y * 2"},{"path":"https://insightsengineering.github.io/teal.code/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Code Storage and Execution Class for teal Applications","text":"encounter bug feature request, please file issue. questions, discussions, updates, use teal channel pharmaverse slack workspace.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/reference/concat.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate two qenv objects — concat","title":"Concatenate two qenv objects — concat","text":"Combine two qenv objects simple concatenate environments code.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/concat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate two qenv objects — concat","text":"","code":"concat(x, y)"},{"path":"https://insightsengineering.github.io/teal.code/reference/concat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate two qenv objects — concat","text":"x (qenv) y (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/concat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate two qenv objects — concat","text":"qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/concat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Concatenate two qenv objects — concat","text":"recommend use join method stricter control case x y contain duplicated bindings code. RHS argument content priority LHS one.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/concat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate two qenv objects — concat","text":"","code":"q <- qenv() q1 <- eval_code(q, expression(iris1 <- iris, mtcars1 <- mtcars)) q2 <- q1 q1 <- eval_code(q1, \"iris2 <- iris\") q2 <- eval_code(q2, \"mtcars2 <- mtcars\") qq <- concat(q1, q2) get_code(qq) #> [1] \"iris1 <- iris\\nmtcars1 <- mtcars\\niris2 <- iris\\niris1 <- iris\\nmtcars1 <- mtcars\\nmtcars2 <- mtcars\""},{"path":"https://insightsengineering.github.io/teal.code/reference/dev_suppress.html","id":null,"dir":"Reference","previous_headings":"","what":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"function opens PDF graphics device using grDevices::pdf suppress plot display IDE. purpose function avoid opening graphic devices directly IDE.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/dev_suppress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"","code":"dev_suppress(x)"},{"path":"https://insightsengineering.github.io/teal.code/reference/dev_suppress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"x lazy binding generates plot(s)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/dev_suppress.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"return value, called side effects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/dev_suppress.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"function uses base::.exit ensure PDF graphics device closed (using grDevices::dev.) function exits, regardless whether exits normally due error. necessary clean graphics device properly avoid potential issues.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/dev_suppress.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"","code":"dev_suppress(plot(1:10))"},{"path":"https://insightsengineering.github.io/teal.code/reference/dot-check_joinable.html","id":null,"dir":"Reference","previous_headings":"","what":"If two qenv can be joined — .check_joinable","title":"If two qenv can be joined — .check_joinable","text":"Checks two qenv objects can combined. information, please see join","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/dot-check_joinable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"If two qenv can be joined — .check_joinable","text":"","code":".check_joinable(x, y)"},{"path":"https://insightsengineering.github.io/teal.code/reference/dot-check_joinable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"If two qenv can be joined — .check_joinable","text":"x (qenv) y (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/dot-check_joinable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"If two qenv can be joined — .check_joinable","text":"TRUE able join character used print error message.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_code_dependency.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code dependency of an object — get_code_dependency","title":"Get code dependency of an object — get_code_dependency","text":"Extract subset code required reproduce specific object(s), including code producing side-effects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_code_dependency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code dependency of an object — get_code_dependency","text":"","code":"get_code_dependency(code, names, check_code_names = TRUE)"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_code_dependency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code dependency of an object — get_code_dependency","text":"code character code. names character vector object names. check_code_names logical(1) flag specifying warning non-existing names displayed.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_code_dependency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code dependency of an object — get_code_dependency","text":"Character vector, subset code. Note subsetting actually done calls code, necessarily elements vector.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_code_dependency.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get code dependency of an object — get_code_dependency","text":"Given character vector code, function extract part code responsible creating variables specified names. includes final call creates variable(s) question well parent calls, .e. calls create variables used final call parents, etc. Also included calls create side-effects like establishing connections. assumed object dependency established using three assignment operators: <-, =, -> . assignment methods (assign, <<-) non-standard-evaluation methods supported. Side-effects detected automatically must marked code. Add # @linksto object end line side-effect occurs specify line required reproduce variable called object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Access environment included in qenv — get_env","title":"Access environment included in qenv — get_env","text":"access environment included qenv contains data objects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access environment included in qenv — get_env","text":"","code":"get_env(object)"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access environment included in qenv — get_env","text":"object (qenv).","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Access environment included in qenv — get_env","text":"environment stored qenv data objects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_env.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Access environment included in qenv — get_env","text":"","code":"q <- qenv() q1 <- within(q, { a <- 5 b <- data.frame(x = 1:10) }) get_env(q1) #> "},{"path":"https://insightsengineering.github.io/teal.code/reference/get_messages.html","id":null,"dir":"Reference","previous_headings":"","what":"Get messages from qenv object — get_messages","title":"Get messages from qenv object — get_messages","text":"Retrieve messages raised code evaluation qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_messages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get messages from qenv object — get_messages","text":"","code":"get_messages(object)"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_messages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get messages from qenv object — get_messages","text":"object (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_messages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get messages from qenv object — get_messages","text":"character containing warning information NULL messages.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_messages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get messages from qenv object — get_messages","text":"","code":"data_q <- qenv() data_q <- eval_code(data_q, \"iris_data <- iris\") warning_qenv <- eval_code( data_q, bquote(p <- hist(iris_data[, .(\"Sepal.Length\")], ff = \"\")) ) cat(get_messages(warning_qenv))"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Get object from qenv — get_var","title":"Get object from qenv — get_var","text":"native R operators/functions: x[[name]], x$name get(). Retrieve variables qenv environment.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get object from qenv — get_var","text":"","code":"get_var(object, var) # S3 method for class 'qenv.error' x[[i]]"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get object from qenv — get_var","text":"object, x (qenv) var, (character(1)) variable name.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get object from qenv — get_var","text":"value required variable (var) within qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get object from qenv — get_var","text":"","code":"q <- qenv() q1 <- eval_code(q, code = quote(a <- 1)) q2 <- eval_code(q1, code = \"b <- a\") get_var(q2, \"b\") #> Warning: `get_var()` was deprecated in teal.code 0.5.1. #> ℹ Please use `base::get()` instead. #> [1] 1"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warn_message_util.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain warnings or messages from code slot — get_warn_message_util","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"Obtain warnings messages code slot","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warn_message_util.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"","code":"get_warn_message_util(object, what)"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warn_message_util.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"object (qenv) (\"warning\" \"message\")","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warn_message_util.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"character(1) containing combined message NULL warnings/messages","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warnings.html","id":null,"dir":"Reference","previous_headings":"","what":"Get warnings from qenv object — get_warnings","title":"Get warnings from qenv object — get_warnings","text":"Retrieve warnings raised code evaluation qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warnings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get warnings from qenv object — get_warnings","text":"","code":"get_warnings(object)"},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warnings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get warnings from qenv object — get_warnings","text":"object (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warnings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get warnings from qenv object — get_warnings","text":"character containing warning information NULL warnings.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/get_warnings.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get warnings from qenv object — get_warnings","text":"","code":"data_q <- qenv() data_q <- eval_code(data_q, \"iris_data <- iris\") warning_qenv <- eval_code( data_q, bquote(p <- hist(iris_data[, .(\"Sepal.Length\")], ff = \"\")) ) cat(get_warnings(warning_qenv)) #> ~~~ Warnings ~~~ #> #> > \"ff\" is not a graphical parameter #> when running code: #> p <- hist(iris_data[, \"Sepal.Length\"], ff = \"\") #> #> ~~~ Trace ~~~ #> #> iris_data <- iris #> p <- hist(iris_data[, \"Sepal.Length\"], ff = \"\")"},{"path":"https://insightsengineering.github.io/teal.code/reference/join.html","id":null,"dir":"Reference","previous_headings":"","what":"Join qenv objects — c.qenv","title":"Join qenv objects — c.qenv","text":"Checks merges two qenv objects one qenv object. join() function superseded c() function.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/join.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join qenv objects — c.qenv","text":"","code":"# S3 method for class 'qenv' c(...) # S3 method for class 'qenv.error' c(...) join(x, y)"},{"path":"https://insightsengineering.github.io/teal.code/reference/join.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join qenv objects — c.qenv","text":"... (qenv qenv.error). x (qenv) y (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/join.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join qenv objects — c.qenv","text":"qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/join.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Join qenv objects — c.qenv","text":"common code start qenvs placed start joined qenv. allows consistent behavior joining qenvs share common ancestor. See example. situations join() properly performed, three scenarios: qenv objects contain object name identical. Example: example, mtcars1 object exists x y objects content identical. mtcars1 x qenv object columns mtcars1 y qenv object (one column). join() look identical code elements qenv objects. index position code elements must determine evaluation order. Otherwise, join() throw error message. Example: error occurs index position common code elements two objects . usage temporary variable code expression cause join() fail. Example: c() fails provide proper result temporary variable exists objects different value. fix , can set <- NULL code expression objects.","code":"x <- eval_code(qenv(), expression(mtcars1 <- mtcars)) y <- eval_code(qenv(), expression(mtcars1 <- mtcars['wt'])) z <- c(x, y) # Error message will occur common_q <- eval_code(qenv(), expression(v <- 1)) x <- eval_code( common_q, \"x <- v\" ) y <- eval_code( common_q, \"y <- v\" ) z <- eval_code( y, \"z <- v\" ) q <- c(x, y) join_q <- c(q, z) # Error message will occur # Check the order of evaluation based on the id slot common_q <- qenv() x <- eval_code( common_q, \"x <- numeric(0) for (i in 1:2) { x <- c(x, i) }\" ) y <- eval_code( common_q, \"y <- numeric(0) for (i in 1:3) { y <- c(y, i) }\" ) q <- join(x,y) # Error message will occur # Check the value of temporary variable i in both objects x$i # Output: 2 y$i # Output: 3 common_q <- qenv() x <- eval_code( common_q, \"x <- numeric(0) for (i in 1:2) { x <- c(x, i) } # dummy i variable to fix it i <- NULL\" ) y <- eval_code( common_q, \"y <- numeric(0) for (i in 1:3) { y <- c(y, i) } # dummy i variable to fix it i <- NULL\" ) q <- c(x,y)"},{"path":"https://insightsengineering.github.io/teal.code/reference/join.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join qenv objects — c.qenv","text":"","code":"q <- qenv() q1 <- within(q, { iris1 <- iris mtcars1 <- mtcars }) q1 <- within(q1, iris2 <- iris) q2 <- within(q1, mtcars2 <- mtcars) qq <- c(q1, q2) cat(get_code(qq)) #> iris1 <- iris #> mtcars1 <- mtcars #> iris2 <- iris #> mtcars2 <- mtcars q <- qenv() q1 <- eval_code(q, expression(iris1 <- iris, mtcars1 <- mtcars)) q2 <- q1 q1 <- eval_code(q1, \"iris2 <- iris\") q2 <- eval_code(q2, \"mtcars2 <- mtcars\") qq <- join(q1, q2) #> Warning: `join()` was deprecated in teal.code 0.5.1. #> ℹ Please use `c()` instead. cat(get_code(qq)) #> iris1 <- iris #> mtcars1 <- mtcars #> iris2 <- iris #> mtcars2 <- mtcars common_q <- eval_code(q, quote(x <- 1)) y_q <- eval_code(common_q, quote(y <- x * 2)) z_q <- eval_code(common_q, quote(z <- x * 3)) join_q <- join(y_q, z_q) # get_code only has \"x <- 1\" occurring once cat(get_code(join_q)) #> x <- 1 #> y <- x * 2 #> z <- x * 3"},{"path":"https://insightsengineering.github.io/teal.code/reference/lang2calls.html","id":null,"dir":"Reference","previous_headings":"","what":"Separate calls — lang2calls","title":"Separate calls — lang2calls","text":"Converts language object lists language objects list simple calls.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/lang2calls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Separate calls — lang2calls","text":"","code":"lang2calls(x)"},{"path":"https://insightsengineering.github.io/teal.code/reference/lang2calls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Separate calls — lang2calls","text":"x language object list thereof","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/lang2calls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Separate calls — lang2calls","text":"Given call, expression, list calls list expressions, returns list calls. Symbols atomic vectors (may get mixed list) returned wrapped list.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/lang2calls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Separate calls — lang2calls","text":"","code":"# use non-exported function from teal.code lang2calls <- getFromNamespace(\"lang2calls\", \"teal.code\") expr <- expression( i <- iris, m <- mtcars ) lang2calls(expr) #> [[1]] #> i <- iris #> #> [[2]] #> m <- mtcars #>"},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproducible class with environment and code — qenv-class","title":"Reproducible class with environment and code — qenv-class","text":"Reproducible class environment code.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Reproducible class with environment and code — qenv-class","text":".xData (environment) environment content generated evaluation code (list character) representing code necessary reproduce environment. Read Code section. code slot.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv-class.html","id":"code","dir":"Reference","previous_headings":"","what":"Code","title":"Reproducible class with environment and code — qenv-class","text":"code element character representing one call. element possible attributes: warnings (character) warnings output evaluating code element messages (character) messages output evaluating code element id (integer`) random identifier code element make sure uniqueness joining dependency (character) names objects appear call gets affected call, separated <- (objects LHS <- affected line, objects RHS affecting line)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":null,"dir":"Reference","previous_headings":"","what":"Code tracking with qenv object — qenv","title":"Code tracking with qenv object — qenv","text":"Create qenv object evaluate code track code history.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Code tracking with qenv object — qenv","text":"","code":"qenv() eval_code(object, code) # S3 method for class 'qenv' x[names, ...] get_code(object, deparse = TRUE, names = NULL, ...) # S3 method for class 'qenv' within(data, expr, ...)"},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Code tracking with qenv object — qenv","text":"object (qenv) code (character, language expression) code evaluate. possible preserve original formatting code providing character expression result parse(keep.source = TRUE). x (qenv) names (character) x[names], names objects included qenv subset. Names present qenv skipped. get_code vector object names return code . details see \"Extracting dataset-specific code\" section. ... see Details deparse (logical(1)) flag specifying whether return code character expression. data (qenv) expr (expression) evaluate. Must inline code, see Using language objects...","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Code tracking with qenv object — qenv","text":"qenv returns qenv object. eval_code returns qenv object expr evaluated qenv.error evaluation fails. [[, $ get return value object named name qenv object. names return character vector names objects qenv object. ls return character vector names objects qenv object. show objects named dot prefix, unless .names = TRUE, show objects. get_code returns traced code form specified deparse. within returns qenv object expr evaluated qenv.error evaluation fails.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Code tracking with qenv object — qenv","text":"qenv() instantiates qenv empty environment. changes must made evaluating code eval_code within, thereby ensuring reproducibility. eval_code() evaluates given code qenv environment appends code slot. Thus, qenv instantiated empty, contents environment always result stored code. x[[name]], x$name get(name, x) generic R operators access objects environment. See [[[] details. names(x) calls qenv object list objects environment. get_code() retrieves code stored qenv. ... passes arguments methods. within() convenience function evaluating inline code inside environment qenv. method base generic wraps eval_code provide simplified way passing code. within accepts inline expressions (simple compound) allows injecting values expr ... argument: name:value pairs passed ..., name expr replaced value.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"subsetting","dir":"Reference","previous_headings":"","what":"Subsetting","title":"Code tracking with qenv object — qenv","text":"x[names] subsets objects qenv environment limit code necessary needed build limited objects. ... passes parameters methods.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"extracting-dataset-specific-code","dir":"Reference","previous_headings":"","what":"Extracting dataset-specific code","title":"Code tracking with qenv object — qenv","text":"names get_code specified, code returned limited lines needed create requested objects. code stored qenv analyzed statically determine lines objects interest depend upon. analysis works well objects created standard infix assignment operators (see ?assignOps) can fail situations. Consider following examples: Case 1: Usual assignments. x dependencies, get_code(data, names = \"x\") return second call.y depends x foo, get_code(data, names = \"y\") contain three calls. Case 2: objects created function's side effects. , y depends x x modified foo side effect (reassignment) get_code(data, names = \"y\") return foo() call. overcome limitation, code dependencies can specified manually. Lines side effects occur can flagged adding \"# @linksto \" end. Note within evaluates code passed expr comments ignored. order include comments code one must use eval_code function instead. Now foo() call properly included code required recreate y. Note two functions create objects side effects, assign data, handled automatically. known cases manual tagging necessary: non-standard assignment operators, e.g. %<>% objects used conditions statements: () objects used iterate loops: () creating evaluating language objects, e.g. eval()","code":"q1 <- within(qenv(), { foo <- function(x) { x + 1 } x <- 0 y <- foo(x) }) get_code(q1, names = \"y\") q2 <- within(qenv(){ foo <- function() { x <<- x + 1 } x <- 0 foo() y <- x }) get_code(q2, names = \"y\") q3 <- eval_code(qenv(), \" foo <- function() { x <<- x + 1 } x <- 0 foo() # @linksto x y <- x \") get_code(q3, names = \"y\")"},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"using-language-objects-with-within","dir":"Reference","previous_headings":"","what":"Using language objects with within","title":"Code tracking with qenv object — qenv","text":"Passing language objects expr generally intended can achieved .call. single expressions work substitution available. See examples.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/reference/qenv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Code tracking with qenv object — qenv","text":"","code":"# create empty qenv qenv() #> [L] #> Parent: # evaluate code in qenv q <- qenv() q <- eval_code(q, \"a <- 1\") q <- eval_code(q, \"b <- 2L # with comment\") q <- eval_code(q, quote(library(checkmate))) q <- eval_code(q, expression(assert_number(a))) # Subsetting q <- qenv() q <- eval_code(q, \"a <- 1;b<-2\") q[\"a\"] #> [L] #> Parent: #> Bindings: #> • a: q[c(\"a\", \"b\")] #> [L] #> Parent: #> Bindings: #> • b: #> • a: # Extract objects from qenv q[[\"a\"]] #> [1] 1 q$a #> [1] 1 # list objects in qenv names(q) #> [1] \"a\" \"b\" # retrieve code q <- within(qenv(), { a <- 1 b <- 2 }) get_code(q) #> [1] \"a <- 1\\nb <- 2\" get_code(q, deparse = FALSE) #> expression({ #> a <- 1 #> b <- 2 #> }) get_code(q, names = \"a\") #> [1] \"a <- 1\" q <- qenv() q <- eval_code(q, code = c(\"a <- 1\", \"b <- 2\")) get_code(q, names = \"a\") #> [1] \"a <- 1\" # evaluate code using within q <- qenv() q <- within(q, { i <- iris }) q <- within(q, { m <- mtcars f <- faithful }) q #> [L] #> Parent: #> Bindings: #> • f: [L] #> • i: [L] #> • m: [L] get_code(q) #> [1] \"i <- iris\\nm <- mtcars\\nf <- faithful\" # inject values into code q <- qenv() q <- within(q, i <- iris) within(q, print(dim(subset(i, Species == \"virginica\")))) #> [1] 50 5 #> [L] #> Parent: #> Bindings: #> • i: [L] within(q, print(dim(subset(i, Species == species)))) # fails #> when evaluating qenv code: #> print(dim(subset(i, Species == species)))> within(q, print(dim(subset(i, Species == species))), species = \"versicolor\") #> [1] 50 5 #> [L] #> Parent: #> Bindings: #> • i: [L] species_external <- \"versicolor\" within(q, print(dim(subset(i, Species == species))), species = species_external) #> [1] 50 5 #> [L] #> Parent: #> Bindings: #> • i: [L] # pass language objects expr <- expression(i <- iris, m <- mtcars) within(q, expr) # fails #> when evaluating qenv code: #> expr> do.call(within, list(q, expr)) #> [L] #> Parent: #> Bindings: #> • i: [L] #> • m: [L] exprlist <- list(expression(i <- iris), expression(m <- mtcars)) within(q, exprlist) # fails #> when evaluating qenv code: #> exprlist> do.call(within, list(q, do.call(c, exprlist))) #> [L] #> Parent: #> Bindings: #> • i: [L] #> • m: [L]"},{"path":"https://insightsengineering.github.io/teal.code/reference/show-qenv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Display qenv object — show,qenv-method","title":"Display qenv object — show,qenv-method","text":"Prints qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/show-qenv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display qenv object — show,qenv-method","text":"","code":"# S4 method for class 'qenv' show(object)"},{"path":"https://insightsengineering.github.io/teal.code/reference/show-qenv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display qenv object — show,qenv-method","text":"object (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/show-qenv-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display qenv object — show,qenv-method","text":"object, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal.code/reference/show-qenv-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display qenv object — show,qenv-method","text":"","code":"q <- qenv() q1 <- eval_code(q, expression(a <- 5, b <- data.frame(x = 1:10))) q1 #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L]"},{"path":"https://insightsengineering.github.io/teal.code/reference/teal.code-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal.code: Code storage and execution class for teal applications — teal.code-package","title":"teal.code: Code storage and execution class for teal applications — teal.code-package","text":"teal.code package contains functionalities can used store execute R calls. qenv class allows create teal module returns code reproduce application outputs.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/reference/teal.code-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal.code: Code storage and execution class for teal applications — teal.code-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com Authors: Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com Marcin Kosinski marcin.kosinski.mk1@roche.com Pawel Rucki pawel.rucki@roche.com Nikolas Burkoff nikolas.burkoff@roche.com Mahmoud Hallal mahmoud.hallal@roche.com Maciej Nasinski maciej.nasinski@contractors.roche.com Konrad Pagacz konrad.pagacz@contractors.roche.com Junlue Zhao zhaoj88@gene.com contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"enhancements-0-5-0-9015","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.code 0.5.0.9015","text":"Introduced [.qenv function subset qenv object (code environment) specified object names. #211 get_code() extended names parameter allows code extraction limited objects stored qenv limited names. #210 Introduced get_messages() get messages produced code evaluation. #217 get_code() returns original code formatting (white spaces comments) passed eval_code(). #212 qenv inherits environment class, allowing use ls(), names(), .environment() functions qenv objects. join() method deprecated, please use c() instead get_var() method deprecated, please use get, [[ $ instead.","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"tealcode-050","dir":"Changelog","previous_headings":"","what":"teal.code 0.5.0","title":"teal.code 0.5.0","text":"CRAN release: 2024-01-11","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"breaking-change-0-5-0","dir":"Changelog","previous_headings":"","what":"Breaking Change","title":"teal.code 0.5.0","text":"qenv objects now created qenv() rather new_qenv() (removed). new constructor always creates empty object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"miscellaneous-0-5-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.5.0","text":"Exported qenv class package. @code field qenv class now holds character, expression. get_code method returns single concatenated string code. Added within support qenv.error class. Added get_env method allows extract environment stored qenv@env slot.","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"tealcode-041","dir":"Changelog","previous_headings":"","what":"teal.code 0.4.1","title":"teal.code 0.4.1","text":"CRAN release: 2023-09-12","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"miscellaneous-0-4-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.4.1","text":"Fix NEWS Updated usage installation instructions README. Updated phrasing qenv vignette. Specified minimal version package dependencies. Added within method qenv convenient passing inline code eval_code.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"breaking-change-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking Change","title":"teal.code 0.4.0","text":"chunks removed. new qenv object used instead. See new qenv vignette package details.","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"miscellaneous-0-4-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.4.0","text":"dev_suppress added suppress rendering plots IDE.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"major-breaking-change-0-3-0","dir":"Changelog","previous_headings":"","what":"Major breaking change","title":"teal.code 0.3.0","text":"chunks now deprecated removed package future release. new qenv object used instead. See new qenv vignette package details.","code":""},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"new-features-0-3-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.code 0.3.0","text":"Added concat method qenv offer concatenate functionality.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/news/index.html","id":"miscellaneous-0-2-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.2.0","text":"Removed %_. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"introduction-to-qenv","dir":"Articles","previous_headings":"","what":"Introduction to qenv","title":"qenv","text":"qenv R object contains code environment can used create reproducible outputs.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"initialization","dir":"Articles","previous_headings":"Introduction to qenv","what":"Initialization","title":"qenv","text":"qenv() function serves gateway create initial qenv object:","code":"library(teal.code) # create a new qenv object empty_qenv <- qenv() print(empty_qenv) ## [L] ## Parent: "},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"qenv-basic-usage","dir":"Articles","previous_headings":"Introduction to qenv","what":"qenv basic usage","title":"qenv","text":"eval_code() function executes code within qenv environment, yielding new qenv object output. result can achieved within method qenv class. extract objects qenv, use [[; particularly useful displaying shiny app. can retrieve code used generate qenv using get_code() function.","code":"# evaluate code in qenv my_qenv <- eval_code(empty_qenv, \"x <- 2\") print(my_qenv) ## [L] ## Parent: ## Bindings: ## • x: [L] as.environment(my_qenv) ## q1 <- eval_code(my_qenv, \"y <- x * 2\") q1 <- eval_code(q1, \"z <- y * 2\") # my_qenv still contains only x print(my_qenv) ## [L] ## Parent: ## Bindings: ## • x: [L] names(my_qenv) ## [1] \"x\" # q1 contains x, y and z print(q1) ## [L] ## Parent: ## Bindings: ## • x: [L] ## • y: [L] ## • z: [L] names(q1) ## [1] \"x\" \"y\" \"z\" q2 <- within(my_qenv, y <- x * 2) q2 <- within(q2, z <- y * 2) print(q2) ## [L] ## Parent: ## Bindings: ## • x: [L] ## • y: [L] ## • z: [L] print(q2[[\"y\"]]) ## [1] 4 cat(get_code(q2)) ## x <- 2 ## y <- x * 2 ## z <- y * 2"},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"substitutions","dir":"Articles","previous_headings":"Introduction to qenv","what":"Substitutions","title":"qenv","text":"cases, one may want substitute elements code evaluation. Consider case subset iris defined input value. convenient way pass code substitution use within method. See ?qenv details.","code":"q <- qenv() q <- eval_code(q, quote(i <- subset(iris, Species == \"setosa\"))) q <- eval_code(q, substitute( ii <- subset(iris, Species == species), env = list(species = \"versicolor\") )) input_value <- \"virginica\" q <- eval_code(q, substitute( iii <- subset(iris, Species == species), env = list(species = input_value) )) summary(q[[\"i\"]]$Species) ## setosa versicolor virginica ## 50 0 0 summary(q[[\"ii\"]]$Species) ## setosa versicolor virginica ## 0 50 0 summary(q[[\"iii\"]]$Species) ## setosa versicolor virginica ## 0 0 50 qq <- qenv() qq <- within(qq, i <- subset(iris, Species == \"setosa\")) qq <- within(qq, ii <- subset(iris, Species == species), species = \"versicolor\") input_value <- \"virginica\" qq <- within(qq, iii <- subset(iris, Species == species), species = input_value) summary(qq[[\"i\"]]$Species) ## setosa versicolor virginica ## 50 0 0 summary(qq[[\"ii\"]]$Species) ## setosa versicolor virginica ## 0 50 0 summary(qq[[\"iii\"]]$Species) ## setosa versicolor virginica ## 0 0 50"},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"combining-qenv-objects","dir":"Articles","previous_headings":"Introduction to qenv","what":"Combining qenv objects","title":"qenv","text":"Given pair qenv objects, may able “join” , creating new qenv object encompassing union environments, along requisite code reproduction: feasibility joining qenv objects hinges contents environments code’s order. Refer function documentation details.","code":"common_q <- eval_code(qenv(), quote(x <- 1)) x_q <- eval_code(common_q, quote(y <- 5)) y_q <- eval_code(common_q, quote(z <- 5)) join_q <- c(x_q, y_q) print(join_q) ## ## Parent: ## Bindings: ## • x: ## • y: ## • z: names(join_q) ## [1] \"x\" \"y\" \"z\""},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"warnings-and-messages-in-qenv-objects","dir":"Articles","previous_headings":"Introduction to qenv","what":"Warnings and messages in qenv objects","title":"qenv","text":"cases warnings messages arise evaluating code within qenv environment, captured stored within qenv object. Access messages warnings using returns NULLm warnings messages present.","code":"q_message <- eval_code(qenv(), quote(message(\"this is a message\"))) get_messages(q_message) ## [1] \"~~~ Messages ~~~\\n\\n> this is a message\\nwhen running code:\\nmessage(\\\"this is a message\\\")\\n\\n~~~ Trace ~~~\\n\\nmessage(\\\"this is a message\\\")\" q_warning <- eval_code(qenv(), quote(warning(\"and this is a warning\"))) get_warnings(q_warning) ## [1] \"~~~ Warnings ~~~\\n\\n> and this is a warning\\nwhen running code:\\nwarning(\\\"and this is a warning\\\")\\n\\n~~~ Trace ~~~\\n\\nwarning(\\\"and this is a warning\\\")\""},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"utilizing-qenv-inside-shiny-applications","dir":"Articles","previous_headings":"","what":"Utilizing qenv inside shiny applications","title":"qenv","text":"functions can seamlessly integrated shiny applications produce reproducible outputs. example , rcode section showcases code employed generating output. employing qenv evaluate code, error occur, object type qenv.error generated. object can utilized wherever qenv object used, alleviating need code alterations handle errors. Select error_option example witness qenv error handling action.","code":"library(shiny) # create an initial qenv with the data in data_q <- qenv() data_q <- eval_code(data_q, \"iris_data <- iris\") ui <- fluidPage( radioButtons( \"option\", \"Choose a column to plot:\", c(\"Sepal.Length\", \"Sepal.Width\", \"Petal.Length\", \"Petal.Width\", \"error_option\") ), verbatimTextOutput(\"rcode\"), plotOutput(\"plot\") ) server <- function(input, output, session) { # create a qenv containing the reproducible output output_q <- reactive({ req(input$option) eval_code( data_q, bquote(p <- hist(iris_data[, .(input$option)])) ) }) # display output output$plot <- renderPlot(output_q()[[\"p\"]]) # display code output$rcode <- renderText(get_code(output_q())) } if (interactive()) { shinyApp(ui, server) }"},{"path":"https://insightsengineering.github.io/teal.code/main/articles/qenv.html","id":"qenv-and-teal-applications","dir":"Articles","previous_headings":"","what":"qenv and teal applications","title":"qenv","text":"versatile qenv object can seamlessly integrate teal modules. Explore teal vignette Creating Custom Modules detailed guidance.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Aleksander Chlebowski. Author. Marcin Kosinski. Author. Pawel Rucki. Author. Nikolas Burkoff. Author. Mahmoud Hallal. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Chlebowski , Kosinski M, Rucki P, Burkoff N, Hallal M, Nasinski M, Pagacz K, Zhao J (2024). teal.code: Code Storage Execution Class 'teal' Applications. R package version 0.5.0.9015, https://github.com/insightsengineering/teal.code, https://insightsengineering.github.io/teal.code/main/.","code":"@Manual{, title = {teal.code: Code Storage and Execution Class for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Pawel Rucki and Nikolas Burkoff and Mahmoud Hallal and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, note = {R package version 0.5.0.9015, https://github.com/insightsengineering/teal.code}, url = {https://insightsengineering.github.io/teal.code/main/}, }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Code Storage and Execution Class for teal Applications","text":"teal.code R library providing tools store code execution environment associated . features include: qenv class tracking code storing variables integrates well shiny reactive expressions use shiny applications whose outputs require reproducibility (.e. code used application can retrieved rerun) ability chain join qenv objects together provide fine-grained control executed code automatic handling errors warnings encountered executed code","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Code Storage and Execution Class for teal Applications","text":"Alternatively, might want use development version.","code":"# stable versions install.packages('teal.code') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.code\")"},{"path":"https://insightsengineering.github.io/teal.code/main/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Code Storage and Execution Class for teal Applications","text":"understand use package, please refer Getting Started article, provides multiple examples code implementation. showcase example usage","code":"library(teal.code) my_qenv <- eval_code(qenv(), \"x <- 5\") my_qenv #> [L] #> Parent: #> Bindings: #> • x: [L] as.environment(my_qenv) #> names(my_qenv) #> [1] \"x\" qenv_2 <- eval_code(my_qenv, \"y <- x * 2\") qenv_2 <- eval_code(qenv_2, \"z <- y * 2\") qenv_2 #> [L] #> Parent: #> Bindings: #> • x: [L] #> • y: [L] #> • z: [L] environment(qenv_2) #> names(qenv_2) #> [1] \"x\" \"y\" \"z\" qenv_2[[\"y\"]] #> [1] 10 cat(get_code(qenv_2)) #> x <- 5 #> y <- x * 2 #> z <- y * 2"},{"path":"https://insightsengineering.github.io/teal.code/main/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Code Storage and Execution Class for teal Applications","text":"encounter bug feature request, please file issue. questions, discussions, updates, use teal channel pharmaverse slack workspace.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/reference/concat.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate two qenv objects — concat","title":"Concatenate two qenv objects — concat","text":"Combine two qenv objects simple concatenate environments code.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/concat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate two qenv objects — concat","text":"","code":"concat(x, y)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/concat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate two qenv objects — concat","text":"x (qenv) y (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/concat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate two qenv objects — concat","text":"qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/concat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Concatenate two qenv objects — concat","text":"recommend use join method stricter control case x y contain duplicated bindings code. RHS argument content priority LHS one.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/concat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Concatenate two qenv objects — concat","text":"","code":"q <- qenv() q1 <- eval_code(q, expression(iris1 <- iris, mtcars1 <- mtcars)) q2 <- q1 q1 <- eval_code(q1, \"iris2 <- iris\") q2 <- eval_code(q2, \"mtcars2 <- mtcars\") qq <- concat(q1, q2) get_code(qq) #> [1] \"iris1 <- iris\\nmtcars1 <- mtcars\\niris2 <- iris\\niris1 <- iris\\nmtcars1 <- mtcars\\nmtcars2 <- mtcars\""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dev_suppress.html","id":null,"dir":"Reference","previous_headings":"","what":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"function opens PDF graphics device using grDevices::pdf suppress plot display IDE. purpose function avoid opening graphic devices directly IDE.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dev_suppress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"","code":"dev_suppress(x)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dev_suppress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"x lazy binding generates plot(s)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dev_suppress.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"return value, called side effects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dev_suppress.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"function uses base::.exit ensure PDF graphics device closed (using grDevices::dev.) function exits, regardless whether exits normally due error. necessary clean graphics device properly avoid potential issues.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dev_suppress.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Suppresses plot display in the IDE by opening a PDF graphics device — dev_suppress","text":"","code":"dev_suppress(plot(1:10))"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dot-check_joinable.html","id":null,"dir":"Reference","previous_headings":"","what":"If two qenv can be joined — .check_joinable","title":"If two qenv can be joined — .check_joinable","text":"Checks two qenv objects can combined. information, please see join","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dot-check_joinable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"If two qenv can be joined — .check_joinable","text":"","code":".check_joinable(x, y)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dot-check_joinable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"If two qenv can be joined — .check_joinable","text":"x (qenv) y (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/dot-check_joinable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"If two qenv can be joined — .check_joinable","text":"TRUE able join character used print error message.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_code_dependency.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code dependency of an object — get_code_dependency","title":"Get code dependency of an object — get_code_dependency","text":"Extract subset code required reproduce specific object(s), including code producing side-effects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_code_dependency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code dependency of an object — get_code_dependency","text":"","code":"get_code_dependency(code, names, check_code_names = TRUE)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_code_dependency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code dependency of an object — get_code_dependency","text":"code character code. names character vector object names. check_code_names logical(1) flag specifying warning non-existing names displayed.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_code_dependency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code dependency of an object — get_code_dependency","text":"Character vector, subset code. Note subsetting actually done calls code, necessarily elements vector.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_code_dependency.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get code dependency of an object — get_code_dependency","text":"Given character vector code, function extract part code responsible creating variables specified names. includes final call creates variable(s) question well parent calls, .e. calls create variables used final call parents, etc. Also included calls create side-effects like establishing connections. assumed object dependency established using three assignment operators: <-, =, -> . assignment methods (assign, <<-) non-standard-evaluation methods supported. Side-effects detected automatically must marked code. Add # @linksto object end line side-effect occurs specify line required reproduce variable called object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Access environment included in qenv — get_env","title":"Access environment included in qenv — get_env","text":"access environment included qenv contains data objects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Access environment included in qenv — get_env","text":"","code":"get_env(object)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Access environment included in qenv — get_env","text":"object (qenv).","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Access environment included in qenv — get_env","text":"environment stored qenv data objects.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_env.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Access environment included in qenv — get_env","text":"","code":"q <- qenv() q1 <- within(q, { a <- 5 b <- data.frame(x = 1:10) }) get_env(q1) #> "},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_messages.html","id":null,"dir":"Reference","previous_headings":"","what":"Get messages from qenv object — get_messages","title":"Get messages from qenv object — get_messages","text":"Retrieve messages raised code evaluation qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_messages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get messages from qenv object — get_messages","text":"","code":"get_messages(object)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_messages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get messages from qenv object — get_messages","text":"object (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_messages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get messages from qenv object — get_messages","text":"character containing warning information NULL messages.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_messages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get messages from qenv object — get_messages","text":"","code":"data_q <- qenv() data_q <- eval_code(data_q, \"iris_data <- iris\") warning_qenv <- eval_code( data_q, bquote(p <- hist(iris_data[, .(\"Sepal.Length\")], ff = \"\")) ) cat(get_messages(warning_qenv))"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Get object from qenv — get_var","title":"Get object from qenv — get_var","text":"native R operators/functions: x[[name]], x$name get(). Retrieve variables qenv environment.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get object from qenv — get_var","text":"","code":"get_var(object, var) # S3 method for class 'qenv.error' x[[i]]"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get object from qenv — get_var","text":"object, x (qenv) var, (character(1)) variable name.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get object from qenv — get_var","text":"value required variable (var) within qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get object from qenv — get_var","text":"","code":"q <- qenv() q1 <- eval_code(q, code = quote(a <- 1)) q2 <- eval_code(q1, code = \"b <- a\") get_var(q2, \"b\") #> Warning: `get_var()` was deprecated in teal.code 0.5.1. #> ℹ Please use `base::get()` instead. #> [1] 1"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warn_message_util.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain warnings or messages from code slot — get_warn_message_util","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"Obtain warnings messages code slot","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warn_message_util.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"","code":"get_warn_message_util(object, what)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warn_message_util.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"object (qenv) (\"warning\" \"message\")","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warn_message_util.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain warnings or messages from code slot — get_warn_message_util","text":"character(1) containing combined message NULL warnings/messages","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warnings.html","id":null,"dir":"Reference","previous_headings":"","what":"Get warnings from qenv object — get_warnings","title":"Get warnings from qenv object — get_warnings","text":"Retrieve warnings raised code evaluation qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warnings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get warnings from qenv object — get_warnings","text":"","code":"get_warnings(object)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warnings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get warnings from qenv object — get_warnings","text":"object (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warnings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get warnings from qenv object — get_warnings","text":"character containing warning information NULL warnings.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/get_warnings.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get warnings from qenv object — get_warnings","text":"","code":"data_q <- qenv() data_q <- eval_code(data_q, \"iris_data <- iris\") warning_qenv <- eval_code( data_q, bquote(p <- hist(iris_data[, .(\"Sepal.Length\")], ff = \"\")) ) cat(get_warnings(warning_qenv)) #> ~~~ Warnings ~~~ #> #> > \"ff\" is not a graphical parameter #> when running code: #> p <- hist(iris_data[, \"Sepal.Length\"], ff = \"\") #> #> ~~~ Trace ~~~ #> #> iris_data <- iris #> p <- hist(iris_data[, \"Sepal.Length\"], ff = \"\")"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/join.html","id":null,"dir":"Reference","previous_headings":"","what":"Join qenv objects — c.qenv","title":"Join qenv objects — c.qenv","text":"Checks merges two qenv objects one qenv object. join() function superseded c() function.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/join.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join qenv objects — c.qenv","text":"","code":"# S3 method for class 'qenv' c(...) # S3 method for class 'qenv.error' c(...) join(x, y)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/join.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join qenv objects — c.qenv","text":"... (qenv qenv.error). x (qenv) y (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/join.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join qenv objects — c.qenv","text":"qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/join.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Join qenv objects — c.qenv","text":"common code start qenvs placed start joined qenv. allows consistent behavior joining qenvs share common ancestor. See example. situations join() properly performed, three scenarios: qenv objects contain object name identical. Example: example, mtcars1 object exists x y objects content identical. mtcars1 x qenv object columns mtcars1 y qenv object (one column). join() look identical code elements qenv objects. index position code elements must determine evaluation order. Otherwise, join() throw error message. Example: error occurs index position common code elements two objects . usage temporary variable code expression cause join() fail. Example: c() fails provide proper result temporary variable exists objects different value. fix , can set <- NULL code expression objects.","code":"x <- eval_code(qenv(), expression(mtcars1 <- mtcars)) y <- eval_code(qenv(), expression(mtcars1 <- mtcars['wt'])) z <- c(x, y) # Error message will occur common_q <- eval_code(qenv(), expression(v <- 1)) x <- eval_code( common_q, \"x <- v\" ) y <- eval_code( common_q, \"y <- v\" ) z <- eval_code( y, \"z <- v\" ) q <- c(x, y) join_q <- c(q, z) # Error message will occur # Check the order of evaluation based on the id slot common_q <- qenv() x <- eval_code( common_q, \"x <- numeric(0) for (i in 1:2) { x <- c(x, i) }\" ) y <- eval_code( common_q, \"y <- numeric(0) for (i in 1:3) { y <- c(y, i) }\" ) q <- join(x,y) # Error message will occur # Check the value of temporary variable i in both objects x$i # Output: 2 y$i # Output: 3 common_q <- qenv() x <- eval_code( common_q, \"x <- numeric(0) for (i in 1:2) { x <- c(x, i) } # dummy i variable to fix it i <- NULL\" ) y <- eval_code( common_q, \"y <- numeric(0) for (i in 1:3) { y <- c(y, i) } # dummy i variable to fix it i <- NULL\" ) q <- c(x,y)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/join.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join qenv objects — c.qenv","text":"","code":"q <- qenv() q1 <- within(q, { iris1 <- iris mtcars1 <- mtcars }) q1 <- within(q1, iris2 <- iris) q2 <- within(q1, mtcars2 <- mtcars) qq <- c(q1, q2) cat(get_code(qq)) #> iris1 <- iris #> mtcars1 <- mtcars #> iris2 <- iris #> mtcars2 <- mtcars q <- qenv() q1 <- eval_code(q, expression(iris1 <- iris, mtcars1 <- mtcars)) q2 <- q1 q1 <- eval_code(q1, \"iris2 <- iris\") q2 <- eval_code(q2, \"mtcars2 <- mtcars\") qq <- join(q1, q2) #> Warning: `join()` was deprecated in teal.code 0.5.1. #> ℹ Please use `c()` instead. cat(get_code(qq)) #> iris1 <- iris #> mtcars1 <- mtcars #> iris2 <- iris #> mtcars2 <- mtcars common_q <- eval_code(q, quote(x <- 1)) y_q <- eval_code(common_q, quote(y <- x * 2)) z_q <- eval_code(common_q, quote(z <- x * 3)) join_q <- join(y_q, z_q) # get_code only has \"x <- 1\" occurring once cat(get_code(join_q)) #> x <- 1 #> y <- x * 2 #> z <- x * 3"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/lang2calls.html","id":null,"dir":"Reference","previous_headings":"","what":"Separate calls — lang2calls","title":"Separate calls — lang2calls","text":"Converts language object lists language objects list simple calls.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/lang2calls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Separate calls — lang2calls","text":"","code":"lang2calls(x)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/lang2calls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Separate calls — lang2calls","text":"x language object list thereof","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/lang2calls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Separate calls — lang2calls","text":"Given call, expression, list calls list expressions, returns list calls. Symbols atomic vectors (may get mixed list) returned wrapped list.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/lang2calls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Separate calls — lang2calls","text":"","code":"# use non-exported function from teal.code lang2calls <- getFromNamespace(\"lang2calls\", \"teal.code\") expr <- expression( i <- iris, m <- mtcars ) lang2calls(expr) #> [[1]] #> i <- iris #> #> [[2]] #> m <- mtcars #>"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproducible class with environment and code — qenv-class","title":"Reproducible class with environment and code — qenv-class","text":"Reproducible class environment code.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Reproducible class with environment and code — qenv-class","text":".xData (environment) environment content generated evaluation code (list character) representing code necessary reproduce environment. Read Code section. code slot.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv-class.html","id":"code","dir":"Reference","previous_headings":"","what":"Code","title":"Reproducible class with environment and code — qenv-class","text":"code element character representing one call. element possible attributes: warnings (character) warnings output evaluating code element messages (character) messages output evaluating code element id (integer`) random identifier code element make sure uniqueness joining dependency (character) names objects appear call gets affected call, separated <- (objects LHS <- affected line, objects RHS affecting line)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":null,"dir":"Reference","previous_headings":"","what":"Code tracking with qenv object — qenv","title":"Code tracking with qenv object — qenv","text":"Create qenv object evaluate code track code history.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Code tracking with qenv object — qenv","text":"","code":"qenv() eval_code(object, code) # S3 method for class 'qenv' x[names, ...] get_code(object, deparse = TRUE, names = NULL, ...) # S3 method for class 'qenv' within(data, expr, ...)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Code tracking with qenv object — qenv","text":"object (qenv) code (character, language expression) code evaluate. possible preserve original formatting code providing character expression result parse(keep.source = TRUE). x (qenv) names (character) x[names], names objects included qenv subset. Names present qenv skipped. get_code vector object names return code . details see \"Extracting dataset-specific code\" section. ... see Details deparse (logical(1)) flag specifying whether return code character expression. data (qenv) expr (expression) evaluate. Must inline code, see Using language objects...","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Code tracking with qenv object — qenv","text":"qenv returns qenv object. eval_code returns qenv object expr evaluated qenv.error evaluation fails. [[, $ get return value object named name qenv object. names return character vector names objects qenv object. ls return character vector names objects qenv object. show objects named dot prefix, unless .names = TRUE, show objects. get_code returns traced code form specified deparse. within returns qenv object expr evaluated qenv.error evaluation fails.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Code tracking with qenv object — qenv","text":"qenv() instantiates qenv empty environment. changes must made evaluating code eval_code within, thereby ensuring reproducibility. eval_code() evaluates given code qenv environment appends code slot. Thus, qenv instantiated empty, contents environment always result stored code. x[[name]], x$name get(name, x) generic R operators access objects environment. See [[[] details. names(x) calls qenv object list objects environment. get_code() retrieves code stored qenv. ... passes arguments methods. within() convenience function evaluating inline code inside environment qenv. method base generic wraps eval_code provide simplified way passing code. within accepts inline expressions (simple compound) allows injecting values expr ... argument: name:value pairs passed ..., name expr replaced value.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"subsetting","dir":"Reference","previous_headings":"","what":"Subsetting","title":"Code tracking with qenv object — qenv","text":"x[names] subsets objects qenv environment limit code necessary needed build limited objects. ... passes parameters methods.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"extracting-dataset-specific-code","dir":"Reference","previous_headings":"","what":"Extracting dataset-specific code","title":"Code tracking with qenv object — qenv","text":"names get_code specified, code returned limited lines needed create requested objects. code stored qenv analyzed statically determine lines objects interest depend upon. analysis works well objects created standard infix assignment operators (see ?assignOps) can fail situations. Consider following examples: Case 1: Usual assignments. x dependencies, get_code(data, names = \"x\") return second call.y depends x foo, get_code(data, names = \"y\") contain three calls. Case 2: objects created function's side effects. , y depends x x modified foo side effect (reassignment) get_code(data, names = \"y\") return foo() call. overcome limitation, code dependencies can specified manually. Lines side effects occur can flagged adding \"# @linksto \" end. Note within evaluates code passed expr comments ignored. order include comments code one must use eval_code function instead. Now foo() call properly included code required recreate y. Note two functions create objects side effects, assign data, handled automatically. known cases manual tagging necessary: non-standard assignment operators, e.g. %<>% objects used conditions statements: () objects used iterate loops: () creating evaluating language objects, e.g. eval()","code":"q1 <- within(qenv(), { foo <- function(x) { x + 1 } x <- 0 y <- foo(x) }) get_code(q1, names = \"y\") q2 <- within(qenv(){ foo <- function() { x <<- x + 1 } x <- 0 foo() y <- x }) get_code(q2, names = \"y\") q3 <- eval_code(qenv(), \" foo <- function() { x <<- x + 1 } x <- 0 foo() # @linksto x y <- x \") get_code(q3, names = \"y\")"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"using-language-objects-with-within","dir":"Reference","previous_headings":"","what":"Using language objects with within","title":"Code tracking with qenv object — qenv","text":"Passing language objects expr generally intended can achieved .call. single expressions work substitution available. See examples.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/reference/qenv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Code tracking with qenv object — qenv","text":"","code":"# create empty qenv qenv() #> [L] #> Parent: # evaluate code in qenv q <- qenv() q <- eval_code(q, \"a <- 1\") q <- eval_code(q, \"b <- 2L # with comment\") q <- eval_code(q, quote(library(checkmate))) q <- eval_code(q, expression(assert_number(a))) # Subsetting q <- qenv() q <- eval_code(q, \"a <- 1;b<-2\") q[\"a\"] #> [L] #> Parent: #> Bindings: #> • a: q[c(\"a\", \"b\")] #> [L] #> Parent: #> Bindings: #> • b: #> • a: # Extract objects from qenv q[[\"a\"]] #> [1] 1 q$a #> [1] 1 # list objects in qenv names(q) #> [1] \"a\" \"b\" # retrieve code q <- within(qenv(), { a <- 1 b <- 2 }) get_code(q) #> [1] \"a <- 1\\nb <- 2\" get_code(q, deparse = FALSE) #> expression({ #> a <- 1 #> b <- 2 #> }) get_code(q, names = \"a\") #> [1] \"a <- 1\" q <- qenv() q <- eval_code(q, code = c(\"a <- 1\", \"b <- 2\")) get_code(q, names = \"a\") #> [1] \"a <- 1\" # evaluate code using within q <- qenv() q <- within(q, { i <- iris }) q <- within(q, { m <- mtcars f <- faithful }) q #> [L] #> Parent: #> Bindings: #> • f: [L] #> • i: [L] #> • m: [L] get_code(q) #> [1] \"i <- iris\\nm <- mtcars\\nf <- faithful\" # inject values into code q <- qenv() q <- within(q, i <- iris) within(q, print(dim(subset(i, Species == \"virginica\")))) #> [1] 50 5 #> [L] #> Parent: #> Bindings: #> • i: [L] within(q, print(dim(subset(i, Species == species)))) # fails #> when evaluating qenv code: #> print(dim(subset(i, Species == species)))> within(q, print(dim(subset(i, Species == species))), species = \"versicolor\") #> [1] 50 5 #> [L] #> Parent: #> Bindings: #> • i: [L] species_external <- \"versicolor\" within(q, print(dim(subset(i, Species == species))), species = species_external) #> [1] 50 5 #> [L] #> Parent: #> Bindings: #> • i: [L] # pass language objects expr <- expression(i <- iris, m <- mtcars) within(q, expr) # fails #> when evaluating qenv code: #> expr> do.call(within, list(q, expr)) #> [L] #> Parent: #> Bindings: #> • i: [L] #> • m: [L] exprlist <- list(expression(i <- iris), expression(m <- mtcars)) within(q, exprlist) # fails #> when evaluating qenv code: #> exprlist> do.call(within, list(q, do.call(c, exprlist))) #> [L] #> Parent: #> Bindings: #> • i: [L] #> • m: [L]"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/show-qenv-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Display qenv object — show,qenv-method","title":"Display qenv object — show,qenv-method","text":"Prints qenv object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/show-qenv-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display qenv object — show,qenv-method","text":"","code":"# S4 method for class 'qenv' show(object)"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/show-qenv-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display qenv object — show,qenv-method","text":"object (qenv)","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/show-qenv-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display qenv object — show,qenv-method","text":"object, invisibly.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/reference/show-qenv-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display qenv object — show,qenv-method","text":"","code":"q <- qenv() q1 <- eval_code(q, expression(a <- 5, b <- data.frame(x = 1:10))) q1 #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L]"},{"path":"https://insightsengineering.github.io/teal.code/main/reference/teal.code-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal.code: Code storage and execution class for teal applications — teal.code-package","title":"teal.code: Code storage and execution class for teal applications — teal.code-package","text":"teal.code package contains functionalities can used store execute R calls. qenv class allows create teal module returns code reproduce application outputs.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/reference/teal.code-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal.code: Code storage and execution class for teal applications — teal.code-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com Authors: Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com Marcin Kosinski marcin.kosinski.mk1@roche.com Pawel Rucki pawel.rucki@roche.com Nikolas Burkoff nikolas.burkoff@roche.com Mahmoud Hallal mahmoud.hallal@roche.com Maciej Nasinski maciej.nasinski@contractors.roche.com Konrad Pagacz konrad.pagacz@contractors.roche.com Junlue Zhao zhaoj88@gene.com contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"enhancements-0-5-0-9015","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.code 0.5.0.9015","text":"Introduced [.qenv function subset qenv object (code environment) specified object names. #211 get_code() extended names parameter allows code extraction limited objects stored qenv limited names. #210 Introduced get_messages() get messages produced code evaluation. #217 get_code() returns original code formatting (white spaces comments) passed eval_code(). #212 qenv inherits environment class, allowing use ls(), names(), .environment() functions qenv objects. join() method deprecated, please use c() instead get_var() method deprecated, please use get, [[ $ instead.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"tealcode-050","dir":"Changelog","previous_headings":"","what":"teal.code 0.5.0","title":"teal.code 0.5.0","text":"CRAN release: 2024-01-11","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"breaking-change-0-5-0","dir":"Changelog","previous_headings":"","what":"Breaking Change","title":"teal.code 0.5.0","text":"qenv objects now created qenv() rather new_qenv() (removed). new constructor always creates empty object.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"miscellaneous-0-5-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.5.0","text":"Exported qenv class package. @code field qenv class now holds character, expression. get_code method returns single concatenated string code. Added within support qenv.error class. Added get_env method allows extract environment stored qenv@env slot.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"tealcode-041","dir":"Changelog","previous_headings":"","what":"teal.code 0.4.1","title":"teal.code 0.4.1","text":"CRAN release: 2023-09-12","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"miscellaneous-0-4-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.4.1","text":"Fix NEWS Updated usage installation instructions README. Updated phrasing qenv vignette. Specified minimal version package dependencies. Added within method qenv convenient passing inline code eval_code.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"breaking-change-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking Change","title":"teal.code 0.4.0","text":"chunks removed. new qenv object used instead. See new qenv vignette package details.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"miscellaneous-0-4-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.4.0","text":"dev_suppress added suppress rendering plots IDE.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"major-breaking-change-0-3-0","dir":"Changelog","previous_headings":"","what":"Major breaking change","title":"teal.code 0.3.0","text":"chunks now deprecated removed package future release. new qenv object used instead. See new qenv vignette package details.","code":""},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"new-features-0-3-0","dir":"Changelog","previous_headings":"","what":"New features","title":"teal.code 0.3.0","text":"Added concat method qenv offer concatenate functionality.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.code/main/news/index.html","id":"miscellaneous-0-2-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.code 0.2.0","text":"Removed %