You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{teal} module returns a teal_report object that extends from teal_data (#255)
# Pull Request
Fixes:
- insightsengineering/teal#1526
Built on top of:
- insightsengineering/teal.reporter#307
- _(#307 will be closed once this PR is stable)_
### Companion PRs:
- insightsengineering/teal#1541
- #255
- insightsengineering/teal.data#370
- insightsengineering/teal.reporter#331
- insightsengineering/teal.modules.general#884
### Changes description
- [x] Add new parameter `cache`
- Caches the result of the last evaluation in the respective `@code`
slot
- [ ] Decide on name
- [x] Remove signature with multiple arguments to allow overriding
`eval_code` in other packages without showing a note
``` r
pkgload::load_all("teal.code")
#> ℹ Loading teal.code
q <- qenv() |>
eval_code(1 + 1, cache = TRUE) |>
eval_code(mtcars <- head(mtcars))
attr(q@code[[1]], "cache")
#> [1] 2
```
<sup>Created on 2025-06-03 with [reprex
v2.1.1](https://reprex.tidyverse.org)</sup>
---------
Co-authored-by: Dawid Kaledkowski <dawid.kaledkowski@gmail.com>
Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
0 commit comments