question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

R libraries aren't linked to RStudio

See original GitHub issue

Was 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
cboettigcommented, Feb 19, 2018

In Rocker we set R_LIBS and R_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

2reactions
ctbcommented, Mar 11, 2018

I can confirm that modifying .Renviron in postBuild works!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found