Bowen Meng
2014-Jun-03 16:55 UTC
[Rd] setting environmental variable inside R function to call C function
wrapper <- function(){ Sys.setenv(TMP="A") print(Sys.getenv("TMP")) .C("c_fun") } As the example above, I hope to set an env var $TMP inside the R function "wrapper", which affects the functionality of the C function call "c_fun". Also the print line shows that $TMP is set to be "A", but the function call of "c_fun" was not affected. Does anyone know why and how to correctly set the env var for subsequent functions? Thanks, BW [[alternative HTML version deleted]]
Seemingly Similar Threads
- [LLVMdev] Usage of getenv() inside LLVM and thread safety
- Problems with environmental variables set with Sys.putenv
- Preventing $R_HOME/site-library/ via R_LIBS_SITE=":" (no other way?)
- [PATCH nbdkit 2/5] vddk: Move reexec code to a new file.
- Environmental variables