[R] copying previously installed libraries to R 2.3.0
Gabor Grothendieck
ggrothendieck at gmail.com
Wed Apr 26 21:54:24 CEST 2006
Note that the FAQ is really no different from batchfiles since the
FAQ does not address how to move or copy the packages and the batchfiles
scripts just do that (with the safeguard that they will not overwrite any
packages that are already there so you could, for example, manually
install a few packages and the move or copy the remaining ones over.)
I think there was some discussion that 2.3.0 might have moving/copying
capability built into the R installer but since it seems that
that did not make it into 2.3.0 it should be possible to use
the scripts, as before, or, alternatively, just re-install all your
packages from scratch.
By the way, there were some comments about the advantage of
keeping your packages in a library so that you can just update
the library. The problem with that is that if you want to keep
multiple versions of R on the same system then you will want
to make sure that each R version has packages that run with that
version of R so if you clobber the ones that run with 2.2.0, say, by
overwriting them with 2.3.0 packages then you can no longer use
that library with 2.2.0. If you keep the packages in .../R/R-2..../library
then you can be sure that each R version has the right packages in
its library without messing around.
On 4/26/06, Thomas Harte <thomas.harte at yahoo.com> wrote:
> the windoze faq that you refer to doesn't quite address the question that i asked, but thanks all the same.
>
> 2.8 What's the best way to upgrade? That's a matter of taste. For most people the best thing to do is to uninstall R (see the previous Q), install the new version, copy any installed packages to the library folder in the new installation, run update.packages() in the new R (`Update packages...' from the Packages menu, if you prefer) and then delete anything left of the old installation. Different versions of R are quite deliberately installed in parallel folders so you can keep old versions around if you wish.
> Upgrading from R 1.x.y to R 2.x.y is special as all the packages need to be reinstalled. Rather than copy them across, make a note of their names and re-install them from CRAN.
>
>
> Christos Hatzis <christos at silicoinsights.com> wrote: See Windows FAQ 2.8 - works well.
>
> -Christos
>
>
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Thomas Harte
> Sent: Wednesday, April 26, 2006 2:54 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] copying previously installed libraries to R 2.3.0
>
> hi all,
>
> is there a new mechanism in R 2.3.0 for copying libraries from, say, R 2.2.1
> to R 2.3.0? i ask because gabor grothendieck comments in his copydir.bat
> (from gabor's batchfiles at:
> http://cran.r-project.org/contrib/extra/batchfiles/batchfiles_0.2-5.zip ):
>
> ``:: I personally upgraded my 2.1.0 to 2.2.0 this way so it seems ok until
> :: R replaces this with something better which is expected for 2.3.0.
> '''
>
> see also the posting below.
>
> cheers,
>
> thomas.
>
>
> [R] copy contributed packages from R 2.2.0 to 2.2.1
> This message: [ Message body ] [ More options ]
> Related messages: [ Next message ] [ Previous message ] [ In reply to ]
> [ Next in thread ]
>
> From: Ronnie Babigumira
> Date: Fri, 23 Dec 2005 15:58:36 +0100
> Hi Helli, this came up last week, Here are some of the replys posted
>
> 1.
> In http://cran.r-project.org/contrib/extra/batchfiles/batchfiles_0.2-5.zip
>
> are two Windows XP batch files:
>
> movedir.bat
> copydir.bat
>
> which will move the packages (which is much faster and suitable if you don't
> need the old version of R any more) or copy the packages (which takes
> longer but preserves the old version).
>
> 2.
> x <- installed.packages()[,1]
> install.packages(x)
>
> 3.
> This is one reason we normally recommend that you install into a separate
> library. Then update.packages(checkBuilt =
> TRUE) is all that is needed. However,
>
> foo <- installed.packages()
> as.vector(foo[is.na(foo[, "Priority"]), 1])
>
> will give you a character vector which you can feed to install.packages(),
> so it's not complex to do manually.
>
> 4.
> If the previous installation is still alive, fire it up and
>
> pS <- packageStatus()
> pkgs <- pS$inst$Package[!pS$inst$Priority %in% c("base", "recommended")]
> save(pkgs, file = "foo")
>
> In the new installation,
>
> load("foo")
> install.packages(pkgs)
>
> Helmut Kudrnovsky wrote:
> > hi R-users,
> >
> > a few days ago R 2.2.1 came out. on my win xp i'installed R 2.2.0. along
> the time i've installed a lot of contributed packages. my
> internet-connection is not very fast.
> >
> > so my question: is it possible after installing R 2.2.1 to do copy/paste
> the contributed packages from the C:\Programme\R221 to the
> C:\Programme\R2.2.1- location in the files system?
> >
> > or have i to download and install the packages new?
> >
> >
> > greetings from the snowy austria
> > merry christmas
> > helli
> >
> > system
> > R.2.2.0
> > win xp
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> Received on Fri Dec 23 2005 - 15:58:36 EST
>
>
> This message: [ Message body ]
> Next message: Matthias Kohl: "[R] convolution of the double exponential
> distribution"
> Previous message: Helmut Kudrnovsky: "[R] copy contributed packages from
> R 2.2.0 to 2.2.1"
> In reply to: Helmut Kudrnovsky: "[R] copy contributed packages from R
> 2.2.0 to 2.2.1"
> Next in thread: Uwe Ligges: "[R] copy contributed packages from R 2.2.0
> to 2.2.1"
>
> Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [
> by author ] [ by messages with attachments ]
>
> This archive was generated by hypermail 2.2.0 : Sat Dec 31 2005 -
> 19:09:32 EST
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list