Open wenyunie opened 9 months ago
Update, just figured out why .Rproj + renv would have this behavior of secret manipulation! It is the.Rprofile. When we have this file in our folder. Whenever Rscript is run (in command lines or in 'Knitting' inside Rstudio Server or in the console of the .Rproj Rstudio sessions), it will first run the renv/activate.R file, which is bringing us to another environment where basically no packages are installed!
I will make this work by deleting this file and its accessaries, so that there won't be an automatic intertwining of environments that we can not control. Anybody who would like to go with path 2) to reproduce the dependencies will need to manually use renv::xxx() functions to make it work. See our discussion in another issue: https://github.com/wenyunie/speed_dating_analysis/issues/59
Everything is fine (running analysis, rendering analysis, rendering report, using bash in terminal to run and render the whole thing) as long as we get rid of the whole .Rproj+renv burden.
The rendering failures and the 'bashfile' failure inside our container is completely because .Rproj and its renv are taking priority over the plain container environment. It is doing this secretly even when we are with terminals or with a Rstudio window(session) of non-project.
Now we see what the problem is, solution is on the way.