[R-sig-Debian] getting started with r2u

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Sun May 18 19:26:15 CEST 2025


On 18 May 2025 at 15:25, ravi wrote:
| Dirk,
| Some lingering questions:
| 1. The packages that I have installed now through r2u have been sent to
| "/usr/lib/R/site-library" 
| This is 4th on the list of .libPaths. Is there any reason for this?
| Somehow, r2u does not like the presence of a user library in the home
| directory (even if it is 1st on .libPaths)? Why?

Standard R package behaviour for 20+ years following a setup two R Core
members and I sketched in Vienna moons ago. These are distro / r2u packages
and that is where they go.

If packages are shadowed _and you do not want that_ remove the shadowing
non-r2u packages.

| 2. bspm is now installed in
| "/usr/local/lib/R/site-library"
| this is 3rd on the list of .libPaths. Is it essential that it should be in one of the sub-directories of local. See my next point also.
| The bspm manual page says that any copy of the bspm package in a user library must be uninstalled. It must be installed with administrative privileges, it says. Why?

Standard R package behaviour for 20+ years following a setup two R Core
members and I sketched in Vienna moons ago. This is *locally installed
package* (as we explained to you a few times over, bspm must be installed
this way because it talks to Python).

| 3.In a previous message, you had said that "bspm itself must be in /usr/local for handshake to the python-apt interface". Would you like to explain what you mean by this.
| None of these questions are of an operational nature i.e. things that I have to know to implement something. I am just being curious.

Yes and it is per 2. above. So please see many previous discussions at the
r2u repo (under issues) and at the bspm repo (also under issues). It has all
been explained before. Just trust us...

Dirk, still traveling

| Thanks, Ravi
| 
| On Saturday, 17 May 2025 at 22:20:31 CEST, Dirk Eddelbuettel <edd using debian.org> wrote: 
| 
| 
| 
| 
| 
| 
| On 17 May 2025 at 20:07, ravi wrote:
| | Ivan and Dirk,
| | Finally, finally, your mojo works!
| | 1. I followed Ivan's suggestion. I ran bspm::enable() in a new R session. Installed a package. The process seemed to use r2u. Again, I followed Ivan and restored the following lines in the script:
| | echo "suppressMessages(bspm::enable())" >> ${RHOME}/etc/Rprofile.site
| | echo "options(bspm.version.check=FALSE)" >> ${RHOME}/etc/Rprofile.site
| 
| We had told to comment those out for one step, and of course implied to turn
| them back on by removing the comment.  We may have been insufficiently clear.
| Oh well.  Now you know.
| 
| | 2. I then ran 
| | sudo ./add_cranapt_noble.sh
| 
| Bad idea in the sense that a) you already ran it and b) these scripts are not
| long / sophisticated enough to know to be robust to run N times in sequence.
| The idea is to run them _precisely_ one time.
| 
| | Before doing this, I made the file executable as program (after right clicking on the properties). After this, I was able to run the above command.
| | 3. Now, the old error message about not being able to locate python3-{dbus,gi,apt} did not appear.
| | 4. In a fresh R session, I was able to install packages via r2u.
| | 5. One final question. I seem to have read somewhere that r2u provides
| | binaries for about 5000 packages. If a particular package is not in a list,
| | will I get a message? How will I know?
| 
| No 5k was a previous attempt. r2u was always north of 20k. On the '24.04 aka
| noble' laptop here:
| 
| $ lsb_release -a
| No LSB modules are available.
| Distributor ID: Ubuntu
| Description:    Ubuntu 24.10
| Release:        24.10
| Codename:      oracular
| $ apt-cache search r-cran-* | wc -l
| 23038
| $ apt-cache search r-bioc-* | wc -l
| 492
| $
| 
| Some come from the distro so it is a slight overcount. For the count of 'only
| r2u' check the website, I post and update the numbers here.
| 
| | Thanks to you, Ivan. Thanks, Dirk, for your patient help.
| 
| Congratulations to you for persevering. I hope you enjoy r2u going forward.
| 
| Dirk
| 
| | Cheers, Ravi
| | 
| | On Saturday, 17 May 2025 at 20:42:17 CEST, Dirk Eddelbuettel <edd using debian.org> wrote: 
| | 
| | 
| | 
| | 
| | 
| | 
| | On 17 May 2025 at 21:18, Ivan Krylov via R-SIG-Debian wrote:
| | | В Sat, 17 May 2025 17:17:09 +0000 (UTC)
| | | ravi via R-SIG-Debian <r-sig-debian using r-project.org> пишет:
| | | 
| | | > 7. Anyway, the bspm package has now been installed in
| | | > /usr/local/lib/R/site-library. No namespace error is returned.
| | | 
| | | Try running bspm::enable() in a fresh R session. After that, do calls
| | | to install.packages() in the same R session go through r2u? If yes,
| | | feel free to restore the lines "suppressMessages(bspm::enable())" and
| | | "options(bspm.version.check=FALSE)" in ${RHOME}/etc/Rprofile.site. If
| | | no, maybe the resulting error messages provide more of a hint.
| | 
| | 
| | That's actually a good debugging step:
| | - check if you can use r2u without bspm, ie try to run
| |     sudo apt install r-cran-digest
| |   or any other package with more depenendies
| | - if that works try to see why involving bspm does create an issue
| | 
| | As Ivan noted, it matters to re-enable bspm in /etc/R/Rprofile.site
| | 
| | Dirk
| | 
| | -- 
| | dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
| | 
| | _______________________________________________
| | R-SIG-Debian mailing list
| | R-SIG-Debian using r-project.org
| | https://stat.ethz.ch/mailman/listinfo/r-sig-debian
| 
| | 
| 
| -- 
| dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-SIG-Debian mailing list