cran4linux / bspm

R Bridge to System Package Manager
https://cran4linux.github.io/bspm
Other
80 stars 4 forks source link

Does not work inside RStudio #39

Closed raffaem closed 1 year ago

raffaem commented 2 years ago

If you open a script in RStudio, write library(lib) where lib is a library which is not installed, RStudio will prompt you to install it:

image

but if you click "Install", installation from source is triggered, not the R-CRAN-* packages.

Enchufa2 commented 2 years ago

Yeap, this is a known issue. It works fine if you just call install.packages or update.packages manually, but RStudio apparently does its own thing when you click "Install" in that message, and bypasses our mechanism to intercept install.packages. Any clue on how this could work would be appreciated.

raffaem commented 2 years ago

I have opened a question on RCommunity

Enchufa2 commented 2 years ago

This is a current limitation: https://github.com/rstudio/rstudio/issues/10945. Unless RStudio allows the system settings to be loaded in the child process, unfortunately there's nothing we can do.

kendonB commented 2 years ago

I find that install.packages also does not work in RStudio - I get the cannot connect to the system package manager error. Works fine running R in the terminal.

raffaem commented 2 years ago

I find that install.packages also does not work in RStudio - I get the cannot connect to the system package manager error. Works fine running R in the terminal.

I think this is a very different issue than what's discussed here

Enchufa2 commented 2 years ago

Yes, it's definitely a different issue. Please see closed issues, and open a new one with more details if that didn't solve your problem.

Enchufa2 commented 1 year ago

This has been addressed in https://github.com/rstudio/rstudio/pull/12176 and listed for the next release of RStudio.

Enchufa2 commented 1 year ago

And working since release 2022.12.0.