reinstall all packages - easy way?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

reinstall all packages - easy way?

Rainer Krug-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

is there an easy way of re-installing all packages in my user library?
I am not referring to checkBuilt=TRUE, but re-install all packages,
irrespective of the version.

Reasoning: I installed Simons patched R for Mac to use the new C
compiler, and I would like to re-install all packages to make sure
that they are not compiled with the old compiler, as this can cause
problems.

I manually removed all Rcpp* packages and re-installed them, but this
is not a real solution.

I also have seen e.g.

http://www.r-bloggers.com/automated-re-install-of-packages-for-r-3-0/

But I am wondering if there is an easier approach?

Thanks,

Rainer

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [hidden email]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSzmeTAAoJENvXNx4PUvmCv3oIANGufnd7kNW1/AEi5WisbmVl
LEjmjUKSO8j/kTRRkHLz0Nkatev8gIbhWUA5ouEAXfVMVSa9B0Ap+ZOyHDHvo+El
y5QBmguJdH+WOWdNtHhJ/aQgMQzeSVMUcaO9848vdDvZhIpsAA8ezYCEMUfXMLBd
JXiUHuBxstANn9PwyJFOW6TMaIdhos53iGXzjSdPlyrJ8azvRJB79ncgEoxQxZTj
kMduOAZ7D2Dq3oJQQ+zqNQlw7syrHfVua8zQQqZ5a8fzrLX+cRRdEoK8PbStzhSN
0uzBnYU1l9pw+zRr0Nzf5iNjMhyLmKl1H+XpgOhRPCjErf0etk7jtyfQsX+wbZI=
=3ibl
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|

Re: reinstall all packages - easy way?

Rainer Krug-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 01/09/14, 10:35 , Berwin A Turlach wrote:
> G'day Rainer,

Hi Berwin,

>
> On Thu, 09 Jan 2014 10:10:43 +0100 Rainer M Krug <[hidden email]>
> wrote:
>
>> is there an easy way of re-installing all packages in my user
>> library? I am not referring to checkBuilt=TRUE, but re-install
>> all packages, irrespective of the version.
>
> Something like:
>
> R> ip <- installed.packages() R> colnames(ip) [1] "Package"
> "LibPath" [3] "Version"               "Priority" [5] "Depends"
> "Imports" [7] "LinkingTo"             "Suggests" [9] "Enhances"
> "License" [11] "License_is_FOSS"       "License_restricts_use" [13]
> "OS_type"               "MD5sum" [15] "NeedsCompilation"
> "Built" R> unique(ip[,"Priority"]) [1] NA            "recommended"
> "base" R> install.packages(ip[is.na(ip[,"Priority"]), "Package"])
>
> perhaps?
>
> The last command is, obviously, not tested.  This supposes that you
> do not want to reinstall the "recommended" or "base" packages
> (probably best to just use "update.packages()" to update those).

Yes - I only want to re-install the user installed packages, which are
in .libPaths()[1] in my case, so I did:

ip <- installed.packages(lib.loc=.libPaths()[1])
install.packages(ip["Package"], type="source")

and off I go. Installing them at the moment.

It just would be nice to have an argument in update.packages() like
reinstallAll=FALSE which, if set to TRUE, would reinstall all
installed packages in the lib.loc.

Thanks,

Rainer

>
> Best wishes,
>
> Berwin
>
> ========================== Full address
> ============================ A/Prof Berwin A Turlach
> Tel.: +61 (8) 6488 3338 (secr) School of Maths and Stats (M019)
> +61 (8) 6488 3383 (self) The University of Western Australia   FAX
> : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009
> e-mail: [hidden email] Australia
> http://www.maths.uwa.edu.au/~berwin 
> http://www.researcherid.com/rid/A-4995-2008
>

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [hidden email]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSznAeAAoJENvXNx4PUvmC2bYIAJOiKGvSZsvFL05/MewA/Xie
mzcm0wcl7ZXMzNyzV2sUXFcI/V8CUly57dqaORYtgIO8L6wi0JdHP90vegPVUsn1
uRQ+eswWNnuQ5Dy/KVfylJg5vJV+6xW6ivSFlDX5XRmhn9RXfb1T6hwX5IuoeufV
OdJW/h5b66QLgOZC28QWnx0UIxWbWYEg7BHT3wFFwViZ/lKQ3+S0JoXulULfxQZ0
4bTZcfI2IflrXJ7tN4dL/jISiJreaIxI4WUMgBoZ6cjvXhI/uQPVGXSfhTGs22TU
UWXEtfVm0ZWYvF8BAsYqrPmffOUc64nFXFavHIaZAGoHvVfXBvB8wrEviQ5j3a8=
=fD0/
-----END PGP SIGNATURE-----

______________________________________________
[hidden email] mailing list
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.