-
Notifications
You must be signed in to change notification settings - Fork 16
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
.Rprofile not picked up by RStudio installed through Nix #421
Comments
that is quite weird, is the R session within rstudio starting in the right folder? It looks like it from your screenshot though... can you paste the output of |
From within the shell:
From RStudio:
|
Yeah that |
I agree that the RStudio
|
A workaround is simply sourcing the |
it really should be automatic, I’m rebuilding the env and will try to reproduce. |
Great, thanks! Let me know if I can help any further! |
ok so I was able to reproduce this: I don't use RStudio so I never noticed this, but still I'm surprised I never did in 2 years we've been developing rix! It seems to be related to this bug: NixOS/nixpkgs#85840 I'll try to see how to fix this |
Thanks in advance! |
Just summarizing NixOS/nixpkgs#85840, it seems that the As mentioned in Section 10.8 Customizing the environment of An Introduction to R, "If the environment variable R_PROFILE_USER is set, the file it points to is used instead of the .Rprofile files." (See also https://cran.r-project.org/web/packages/startup/vignettes/startup-intro.html.) Indeed, in RStudio I get
while
in the shell. The file
I hope this helps! I am not sure if the .Rprofile that is created by |
I opened a PR to wrap |
So there might be solution: if that PR gets merged, then it seems that creating an
and then changing the lines in the
seems to work to at least get rid of the user/ level library... but there's still wrong paths from other packages being loaded. |
Interesting approach! the RStudio hickup override mechanism is not new to me, but it's good to have a quick-fix for one part at least. I think RStudio has specific override mechanisms for the defaults, that happen even after loading .Rprofile in project dir. It has to be somewhere in the docs. |
Hi,
Thanks for the very interesting package!
I was trying out this package to see how easily it would be able to create development environments with RStudio as the IDE, as described in the docs. However, it seems that
.Rprofile
is not picked up when startingrstudio
from the shell, even though it is picked up when I run$(which R)
in the Nix shell. See the screenshot below.Am I doing something wrong, or should I source the file from within RStudio? See the files default.nix and .Rprofile.
The text was updated successfully, but these errors were encountered: