Hi Douglas, That is exactly what I was looking for. Thank you very much!
Hi Jin, Thank you for your solution. It worked for me, but packrat (see below) seems like a more refined approach. You might want to look at it ... Best, Tobias On 1 April 2016 at 05:43, Li Jin <jin...@ga.gov.au> wrote: > Hi Tobias, > Here is something I acquired from this mailing list some years ago. It > works well for me: > > #---run in previous version (e.g. R 3.1.0) > packages <- installed.packages()[,"Package"] > save(packages, file="Rpackages_R3.1.0") > > #---run in new version > load("Rpackages_R3.1.0") > > for (p in setdiff(packages, installed.packages()[,"Package"])) > install.packages(p) > > Hope this helps. > > Jin > > -----Original Message----- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Tobias > Knuth > Sent: Friday, 1 April 2016 12:05 AM > To: r-help@r-project.org > Subject: [DKIM] [R] Batch Installer for R > > Hi everyone, > > in Python, you can run pip install -r filename to install all packages > listed in the file. Is there something similar to R? If not, isn't it quite > easy to write? > > For me, it would be much easier to work on projects with other people if I > could just install all dependencies with one line in a generalised manner. > > Did anybody try something like that before me? > > Best, > Tobias > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > Geoscience Australia Disclaimer: This e-mail (and files transmitted with > it) is intended only for the person or entity to which it is addressed. If > you are not the intended recipient, then you have received this e-mail by > mistake and any use, dissemination, forwarding, printing or copying of this > e-mail and its file attachments is prohibited. The security of emails > transmitted cannot be guaranteed; by forwarding or replying to this email, > you acknowledge and accept these risks. > > ------------------------------------------------------------------------------------------------------------------------- > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.