John C Nash
2009-Jun-14 13:23 UTC
[R-sig-Debian] Installing and maintaining R on Ubuntu 9.04 -, best practice
I had an exchange of ideas on this with Dirk E. a couple of months ago. He can correct this if I state it wrongly, but 1) we agreed that using apt/Synaptic structure was best, but sometimes the packages are not available 2) also that using install.packages when there is a .deb can lead to some "confusion" (the package database on the local system does not know about an R package installed from R) We disagreed on whether a variant of install.packages (and related scripts) was worthwhile so that users could ALWAYS use that version of install.packages and it would do the right thing and go to apt as needed. That is, one can take the view that on Debian systems, one should always try the apt approach first. I feel that it is better to offer a single gateway that then sorts things out behind the curtain. I prepared a reasonably effective trial script that tested the concept. An issue is detecting the availability of an appropriate and viable .deb package and returning proper information on success or failure to the user so they know how to proceed. Dirk had some comments on the possible difficulties in doing that. He has more knowledge of Debian internals than I do. As usual, the fly in the ointment is that folk who know how to prepare such a script clearly don't need it, while those who need it don't have the expertise to prepare it. However, perhaps a small group of us could make an attempt. Or maybe someone has already done it for their own research group. JN> Date: Sat, 13 Jun 2009 22:53:35 +0100 > From: Graham Smith <myotisone at gmail.com> > Subject: [R-sig-Debian] Installing and maintaining R on Ubuntu 9.04 - > best practice > To: r-sig-debian at r-project.org > Message-ID: > <2c75873c0906131453i791859c5k12f6e90d7bdfd02d at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Is there a best practice for installing and updating R on Ubuntu ? > > I've had to clean install Ubuntu so I am starting from fresh. I have > picked up various comments about ONLY using Synaptic OR only using > apt-get OR only running update from inside R. > > Being new to Ubuntu this is a bit confusing. Last time round I > installed via Synaptic, but not all packages were available so > installed packages and run updates from R, but it was suggested this > bad practice. So before I start afresh, can anyone give me some > pointers on the best way of doing this. > > Many thanks, > > Graham > >
Dirk Eddelbuettel
2009-Jun-14 13:41 UTC
[R-sig-Debian] Installing and maintaining R on Ubuntu 9.04 -, best practice
On 14 June 2009 at 09:23, John C Nash wrote: | I had an exchange of ideas on this with Dirk E. a couple of months ago. | He can correct this if I state it wrongly, but | 1) we agreed that using apt/Synaptic structure was best, but sometimes | the packages are not available There are no simple one-sentence summaries. I happen to think a) that package management is a good thing (cf 15 years of Debian using tens of thousands of packages, as well as 10 years of R/CRAN with now 1700 packages) b) that we have no code right now that 'mixes' Debian's dpkg / apt-get and R' install.packages(), both systems are independent of each other and may trample on each other unless you're careful -- which is why we set R_LIBS in Debian / Ubuntu to at least have non-overlapping archives c) all this is _underdocumented_ and someone should just go to, say, the R Wiki and start the 'best practices' document there so that we do not have to re-hash it fifteen times over; the mailing list archives (esp of r-sig-debian) have ample fodder of prior discussion d) last and least importantly, that starting every discussion in the name of the front-end is misleading -- I personally never use synaptic or aptitude directly (I use wajig by Debian and R user/author Graham Williams of rattle fame) so I don't see the point of always calling 'use synaptic'. | 2) also that using install.packages when there is a .deb can lead to | some "confusion" (the package database on the | local system does not know about an R package installed from R) It all depends. See above. R_LIBS splits things so that 'R CMD INSTALL ...' and remove will operate on /usr/local/lib/R/site-library leaving your apt / dpkg managed packages alone. | We disagreed on whether a variant of install.packages (and related | scripts) was worthwhile so that users could I very much think it is both worthwhile, inevitable, and in need of improvements. With Debian offering ~ 100 packages and CRAN offering ~ 1700, you inevitably end up mixing things, | ALWAYS use that version of install.packages and it would do the right | thing and go to apt as needed. That is, one | can take the view that on Debian systems, one should always try the apt | approach first. I feel that it is better to Yes, sure, esp if the Debian-maintained packages is current. | offer a single gateway that then sorts things out behind the curtain. I | prepared a reasonably effective | trial script that tested the concept. An issue is detecting the | availability of an appropriate and viable .deb package | and returning proper information on success or failure to the user so | they know how to proceed. Dirk had some | comments on the possible difficulties in doing that. He has more | knowledge of Debian internals than I do. ... and remains sceptical of the effectivenes of a simple script given that the whole of the packaging infrastrucure is highly complex. That said, if you (John) have time to design, develop, test, refine, ... such a script I'd be the last person stopping you. Dirk | As usual, the fly in the ointment is that folk who know how to prepare | such a script clearly don't need it, while | those who need it don't have the expertise to prepare it. However, | perhaps a small group of us could make an | attempt. Or maybe someone has already done it for their own research group. | | JN | | > Date: Sat, 13 Jun 2009 22:53:35 +0100 | > From: Graham Smith <myotisone at gmail.com> | > Subject: [R-sig-Debian] Installing and maintaining R on Ubuntu 9.04 - | > best practice | > To: r-sig-debian at r-project.org | > Message-ID: | > <2c75873c0906131453i791859c5k12f6e90d7bdfd02d at mail.gmail.com> | > Content-Type: text/plain; charset=UTF-8 | > | > Is there a best practice for installing and updating R on Ubuntu ? | > | > I've had to clean install Ubuntu so I am starting from fresh. I have | > picked up various comments about ONLY using Synaptic OR only using | > apt-get OR only running update from inside R. | > | > Being new to Ubuntu this is a bit confusing. Last time round I | > installed via Synaptic, but not all packages were available so | > installed packages and run updates from R, but it was suggested this | > bad practice. So before I start afresh, can anyone give me some | > pointers on the best way of doing this. | > | > Many thanks, | > | > Graham | > | > | | _______________________________________________ | R-SIG-Debian mailing list | R-SIG-Debian at r-project.org | https://stat.ethz.ch/mailman/listinfo/r-sig-debian -- Three out of two people have difficulties with fractions.
Graham Smith
2009-Jun-14 16:09 UTC
[R-sig-Debian] Installing and maintaining R on Ubuntu 9.04 -, best practice
John and Dirk Thanks you both for this, I did search the archives (probably using the wrong terms) and only found vague mention to the issue, but a Wiki entry giving the sort of overviw you have just given might be useful. It's seems you are forced to do a bit of mix and match becuase if where the differenet packages are available. Graham