-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: functions passed to rlang::exprs
in an R script are not found
#225
Comments
Are you running |
I am not, should I? Per my understanding of the documentation |
Umm... I was able to run this code with no issues.
|
@kodesiba @nicholas-masel maybe an OS issue??? Do you guys have windows machines - I only have R on Linux :( |
Also @missuse many thanks for the feedback!! I forgot to say that!! :) |
Thank you Ben! Will there be attempts to correct the behavior in |
Yes we will look into! I'm not sure on the timeframe, as I think we will have to dive deep here to figure out why the search path is wonky here. That might be a more @kodesiba or @nicholas-masel as they are way more technical then me!! |
@missuse @bms63 Sorry for the delay. I simplified this to a script just to pass a local function to Script (atest.R):
Execution:
Log:
|
@kodesiba After further investigation, I see functions written within the script are being stored in the environment we create to execute the scripts, but functions are not being accessed from that environment. We need to look into the Update: I see local was part of #104. The best I can tell is the function is available within the new environment we create within the |
@bundfussr @manciniedoardo @ddsjoberg perhaps something to discuss in our environments working group? |
What happened?
Hi, and thanks for a great package.
Running
logrx::axecute
from a clean session on the admiral adsl script (https://pharmaverse.github.io/admiral/articles/adsl.html) results in an Error:A reproducible example with a smaller script is provided bellow.
Thank you
Session Information
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
time zone: Europe/Budapest
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pharmaversesdtm_1.0.0 dplyr_1.1.4 admiral_1.1.1
loaded via a namespace (and not attached):
[1] utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 renv_1.0.9 tcltk_4.4.1 xml2_1.3.6 stringi_1.8.4 hms_1.1.3 digest_0.6.35 magrittr_2.0.3
[11] timechange_0.3.0 fastmap_1.2.0 processx_3.8.4 sessioninfo_1.2.2 backports_1.5.0 ps_1.7.6 promises_1.3.0 admiraldev_1.1.0 purrr_1.0.2 fansi_1.0.6
[21] lintr_3.1.2 lazyeval_0.2.2 cli_3.6.2 shiny_1.8.1.1 rlang_1.1.3 crayon_1.5.2 remotes_2.5.0 withr_3.0.0 tools_4.4.1 logrx_0.3.1
[31] httpuv_1.6.15 vctrs_0.6.5 waiter_0.2.5 cyclocomp_1.1.1 R6_2.5.1 mime_0.12 lifecycle_1.0.4 lubridate_1.9.3 stringr_1.5.1 miniUI_0.1.1.1
[41] pkgconfig_2.0.3 desc_1.4.3 callr_3.7.6 rex_1.2.1 pillar_1.9.0 later_1.3.2 data.table_1.15.4 glue_1.7.0 Rcpp_1.0.12 tibble_3.2.1
[51] tidyselect_1.2.1 rstudioapi_0.16.0 xtable_1.8-4 htmltools_0.5.8.1 compiler_4.4.1
Reproducible Example
Create an
adsl_script.R
with following contents:from a clean R session create the log for the script:
the log will contain:
Full log contents:
The text was updated successfully, but these errors were encountered: