Skip to content
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

.Rproj+renv solution in conflicts with Dockerization solution #60

Open
wenyunie opened this issue Dec 2, 2023 · 1 comment
Open

.Rproj+renv solution in conflicts with Dockerization solution #60

wenyunie opened this issue Dec 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@wenyunie
Copy link
Collaborator

wenyunie commented Dec 2, 2023

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.

@wenyunie
Copy link
Collaborator Author

wenyunie commented Dec 2, 2023

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: #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant