A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/insightsengineering/teal.code/tree/main below:

insightsengineering/teal.code: Code storage and execution class for teal applications

teal.code is an R library providing tools to store code and an execution environment associated with it. The features include:

# stable versions
install.packages('teal.code')

Alternatively, you might want to use the development version.

# install.packages("pak")
pak::pak("insightsengineering/teal.code")

To understand how to use this package, please refer to the Getting Started article, which provides multiple examples of code implementation.

Below is the showcase of the example usage

library(teal.code)
my_qenv <- eval_code(qenv(), "x <- 5")
my_qenv
#> <environment: 0x00000225cc85c7a0> [L]
#> Parent: <environment: package:teal.code>
#> Bindings:
#> • x: <dbl> [L]
as.environment(my_qenv)
#> <environment: 0x00000225cc85c7a0>
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
#> <environment: 0x00000225ca866d68> [L]
#> Parent: <environment: package:teal.code>
#> Bindings:
#> • x: <dbl> [L]
#> • y: <dbl> [L]
#> • z: <dbl> [L]
environment(qenv_2)
#> <environment: 0x00000225ca866d68>
names(qenv_2)
#> [1] "x" "y" "z"
cat(get_code(qenv_2))
#> x <- 5
#> y <- x * 2
#> z <- y * 2

If you encounter a bug or have a feature request, please file an issue. For questions, discussions, and updates, use the teal channel in the pharmaverse slack workspace.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4