It's not as easy as it seems.
On my Ubuntu machine at work, I go with the second solution. But because the first one is better if you have enough coverage, we have built cran2deb which provides 2050+ binary deb packages for amd64 and i386 --- but only for Debian testing. That is what I use at home.
As for last question of whether you 'should you expect trouble': No, because R_LIBS_SITE
is set in /etc/R/Renvironment
to be
# edd Apr 2003 Allow local install in /usr/local, also add a directory for
# Debian packaged CRAN packages, and finally the default dir
# edd Jul 2007 Now use R_LIBS_SITE, not R_LIBS
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:
/usr/lib/R/site-library:/usr/lib/R/library'}
which means that your packages go into /usr/local/lib/R/site-library
whereas those managed by apt
go into /usr/lib/R/site-library
and (in the case of base packages) /usr/lib/R/library
.
Hope that clarifies matters. The r-sig-debian mailing list is a more informed place for questions like this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…