Open missuse opened 1 month ago
Are you running logrx::axecute()
in the same file as this adsl script?
I am not, should I? Per my understanding of the documentation logrx::axecute()
should be able to execute an R script provided as argument, and create a log based on the script run.
Umm... I was able to run this code with no issues.
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 20.04.6 LTS
Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so; LAPACK version 3.9.0
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
time zone: UTC
tzcode source: system (glibc)
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] miniUI_0.1.1.1 compiler_4.4.1 promises_1.3.0 logrx_0.3.1 tidyselect_1.2.1
[6] Rcpp_1.0.13 xml2_1.3.6 stringr_1.5.1 later_1.3.2 tidyr_1.3.1
[11] fastmap_1.2.0 readxl_1.4.3 mime_0.12 R6_2.5.1 tcltk_4.4.1
[16] generics_0.1.3 admiraldev_1.1.0 tibble_3.2.1 lubridate_1.9.3 shiny_1.9.1
[21] pillar_1.9.0 rlang_1.1.4 utf8_1.2.4 stringi_1.8.4 httpuv_1.6.15
[26] timechange_0.3.0 cli_3.6.3 withr_3.0.1 magrittr_2.0.3 digest_0.6.37
[31] rstudioapi_0.16.0 xtable_1.8-4 metacore_0.1.3 hms_1.1.3 lifecycle_1.0.4
[36] waiter_0.2.5 vctrs_0.6.5 glue_1.7.0 cellranger_1.1.0 sessioninfo_1.2.2
[41] fansi_1.0.6 purrr_1.0.2 tools_4.4.1 pkgconfig_2.0.3 htmltools_0.5.8.1
@kodesiba @nicholas-masel maybe an OS issue??? Do you guys have windows machines - I only have R on Linux :(
I wouldn't say its a OS issue, I have the same problem on windows and ubuntu. For me the function format_eosstt
is picked up by logrx only if it is already loaded in the environment from which logrx::axecute
is called, if it is not then the error occurs.
when clean global env error about function not found:
if format_eosstt
is in the environment no problems:
Please let me know if there is any action from me that would help in reproducing the problem on your side.
I was able to reproduce error now - I thought I had cleared environment and restarted session.
While not ideal - I found that source
worked as a workaround
Also @missuse many thanks for the feedback!! I forgot to say that!! :)
Thank you Ben!
Will there be attempts to correct the behavior in logrx
, or will using source
to import user defined functions stay as the recommended way to overcome this problem?
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!!
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: