I don’t use R, and nor I do know much about it. However, I maintain R’s installation on linux machines at work.
Today, I learned a new trick to list all installed R-packages. Here it is:
ip = as.data.frame(installed.packages()[,c(1,3:4)])
ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
ip
And here is the sample output:
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> ip = as.data.frame(installed.packages()[,c(1,3:4)])
> ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
> ip
Package Version
akima akima 0.5-12
alr3 alr3 2.0.5
BRugs BRugs 0.8-6
car car 2.1-2
coda coda 0.18-1
colorspace colorspace 1.2-6
DEoptimR DEoptimR 1.0-5
dichromat dichromat 2.0-0
digest digest 0.6.9
distillery distillery 1.0-2
extRemes extRemes 2.0-7
fields fields 8.4-1
...
I don’t have time to explain what each line does. If you’re curious, you can check out using the references below: