R libraries aren't linked to RStudio
See original GitHub issueWas just trying out R functionality in both Jupyter and RStudio, and I don’t think we’re linking libraries correctly in RStudio.
In the R Demo repo I’ve got ggplot2
installing with install.R
. In the resulting Binder session, library(ggplot2)
works fine from Jupyter, but does not work from within the RStudio session (resulting in Error in library(ggplot2) : there is no package called ‘ggplot2’
)
We should figure out how the path linking works with R vs. RStudio, maybe they’re not the same thing
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:18 (9 by maintainers)
Top Results From Across the Web
could not load libraries on Rstudio but R - General
After installing the packages I could not load them on R studio but can on R. I do not understand this. Any ideas...
Read more >R libraries aren't linked to RStudio · Issue #237 - GitHub
Was just trying out R functionality in both Jupyter and RStudio, and I don't think we're linking libraries correctly in RStudio.
Read more >Unable to access libraries in RStudio but not in R
This is a new R and Rstudio installation in my PC, R version 4.1.2. For remote work due to life stuff. I usually...
Read more >Problem Installing Packages in the RStudio IDE - Posit Support
If you're having issues, we recommend trying to install packages in R (outside of RStudio) and see if you're able to do that....
Read more >Packages and libraries | Introduction to R - GitHub Pages
We only need to install a package once on our computer. However, to use the package, we need to load the library every...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In Rocker we set
R_LIBS
andR_LIBS_USER
in the system environment (rocker supports multi-user and root environments, hence we don’t write gloal configs to~/.Renviron
, but otherwise I think this is basically the same solution as @betatim proposes).e.g. see: https://github.com/rocker-org/rocker-versioned/blob/master/r-ver/Dockerfile#L110-L111
I can confirm that modifying .Renviron in postBuild works!