Version/Environment (if relevant):
This can affect any version of R studio.
Issue:
After developing an application or code in an R Studio workspace, it will work as expected. After sharing the environment that it was built on with an Organization and then attempting to run that same code again results in errors in the code like:
Warning: Error in mfunc: attempt to apply non-function
Changing back to the original environment results in the code or application running without any errors.
Root Cause:
Libraries have usually either been updated or versions have changed since the latest revision of the shared environment, affecting the code being run in R Studio. A comparison can be made between libraries to see what has changed using the following function:
sessionInfo()
Resolution:
There is no direct resolution as to which library or package will resolve the error, but comparing the output of sessionInfo() from the original environment and the new revision of the environment is beneficial in resolving the error. An example output of sessionInfo() function shown here will reveal which packages are installed and their version:
Original Environment:
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] DT_0.17 aws.s3_0.3.21 reactable_0.3.0 knitr_1.39 rmarkdown_2.14
[6] tinytex_0.40.1 data.table_1.14.2 tidyr_1.2.0 dplyr_1.0.9 stringr_1.4.0
[11] rlang_1.0.4 here_1.0.1 shiny_1.7.2
loaded via a namespace (and not attached):
[1] tidyselect_1.1.2 xfun_0.31 bslib_0.4.0 purrr_0.3.4
[5] vctrs_0.4.1 generics_0.1.3 htmltools_0.5.3 yaml_2.2.1
[9] base64enc_0.1-3 utf8_1.1.4 later_1.1.0.1 pillar_1.8.0
[13] jquerylib_0.1.4 glue_1.6.2 withr_2.3.0 DBI_1.1.1
[17] bit64_4.0.5 lifecycle_1.0.1 htmlwidgets_1.5.3 memoise_1.1.0
[21] evaluate_0.15 fastmap_1.1.0 crosstalk_1.2.0 httpuv_1.5.4
[25] curl_4.3 fansi_0.4.2 Rcpp_1.0.5 xtable_1.8-4
[29] promises_1.1.1 cachem_1.0.6 jsonlite_1.7.2 mime_0.9
[33] bit_4.0.4 packrat_0.8.1 digest_0.6.27 stringi_1.5.3
[37] rprojroot_2.0.2 cli_3.3.0 tools_4.0.3 magrittr_2.0.1
[41] sass_0.4.2 tibble_3.1.8 crayon_1.4.0 aws.signature_0.6.0
[45] pkgconfig_2.0.3 ellipsis_0.3.2 rsconnect_0.8.27 xml2_1.3.2
[49] assertthat_0.2.1 httr_1.4.2 rstudioapi_0.13 R6_2.5.0
[53] compiler_4.0.3
New Shared Environment:
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] DT_0.17 aws.s3_0.3.21 reactable_0.3.0 knitr_1.39 rmarkdown_2.14
[6] tinytex_0.39.2 data.table_1.14.2 tidyr_1.1.2 dplyr_1.0.2 stringr_1.4.0
[11] rlang_1.0.2 here_1.0.1 shiny_1.7.1
loaded via a namespace (and not attached):
[1] tidyselect_1.1.0 xfun_0.31 bslib_0.3.1 purrr_0.3.4
[5] vctrs_0.4.1 generics_0.1.0 htmltools_0.5.2 yaml_2.2.1
[9] base64enc_0.1-3 later_1.1.0.1 pillar_1.4.7 jquerylib_0.1.4
[13] glue_1.6.2 withr_2.3.0 bit64_4.0.5 lifecycle_0.2.0
[17] htmlwidgets_1.5.3 evaluate_0.15 fastmap_1.1.0 httpuv_1.5.4
[21] crosstalk_1.2.0 curl_4.3 Rcpp_1.0.5 xtable_1.8-4
[25] promises_1.1.1 cachem_1.0.6 jsonlite_1.7.2 mime_0.9
[29] bit_4.0.4 packrat_0.8.0 digest_0.6.27 stringi_1.5.3
[33] rprojroot_2.0.2 cli_3.3.0 tools_4.0.3 magrittr_2.0.1
[37] sass_0.4.1 tibble_3.0.4 crayon_1.4.0 aws.signature_0.6.0
[41] pkgconfig_2.0.3 ellipsis_0.3.2 rsconnect_0.8.25 xml2_1.3.2
[45] httr_1.4.2 R6_2.5.0 compiler_4.0.3
Comments
0 comments
Please sign in to leave a comment.