Skip to content

Lists of R packages

3 messages · Matt Curcio, philippe preux, Rainer M Krug

#
Greetings All,
I would like to find out which R packages I have on my machine and
transfer that set of packages to a new machine.  I have investigated
the command 'installed.packages' and got a partial list but this is
not comprehensive. (!?!)  The partial list does not include the
libraries that I do not normally load on start-up.
Any suggestions?

Conversely, once I have found the complete list can I use
'install.package' to batch install all the packages to another
computer?
Cheers,
M
#
Hi Matt,
maybe the library() command would solve your problem.

However, I take this opportunity to ask an other question related to 
installed packages:
some packages are installed because I install.package'd them; however, I 
usually add the dep = TRUE option, so that some other packages are 
installed because of the dependencies. Once installed, I do not know of 
any way to distinguish the former from the latter; is there one?
Now, moving my R installation to a new machine, I would like to 
re-install only those packages I installed by install.package(), with 
the dep = TRUE option. I feel, and fear, that if I install all the 
packages returned by library() with dep =TRUE option, packages that 
depend on those installed because they depend on those I installed by 
giving their name to install.package() will also be installed.

Now, my workaround is to keep the history of the install.package() 
command I invoked. Defining a function that does the same thing as 
install.packages(), while logging the information in some file does the 
thing.

Hope that helps,

Philippe
On 29/06/2011 19:48, Matt Curcio wrote: