[R] update packages from local

Wayne (Yanwei) Zhang actuaryzhang at uchicago.edu
Sun Jan 3 20:07:33 CET 2010


Sorry. The original message is below. 

Uwe, do you mean if i just want to update the old package abc, i have to run "R 
INSTALL abc_0.1.1.tar.gz" in the shell? I know that will overwrite that package, 
but can I do something with the update.packages() function within R? From what 
I read in the documentation, update.packages() seems to work for local source 
file update as well. 

Anybody any advice?

Thanks





---- Original message ----
Hi all, 
I have an old package installed, say "abc". Now I made some changes to the 
source, 
and built a new version of the source code "abc_0.1.1.tar.gz". How can I update 
the 
old package to this newer version from the local tar.gz file? I was running the 
following, but it did not work. 

setwd("directory where the tar.gz file locates") 

update.packages(repos=NULL,pkgs="abc_0.1.1.tar.gz",type="source") 

The code runs, but when I load library(abc) again, it is still the old version... 
What 
did I miss here?  Thanks.

>Date: Sun, 03 Jan 2010 18:55:44 +0100
>From: Uwe Ligges <ligges at statistik.tu-dortmund.de>  
>Subject: Re: [R] update packages from local  
>To: "Wayne (Yanwei) Zhang" <actuaryzhang at uchicago.edu>
>Cc: David Winsemius <dwinsemius at comcast.net>, r-help at r-project.org
>
>1. Please quote the old threat, at least I do not keep old messages.
>2. Try install.packages() from a freshly started R (that has not loaded 
>the package in advance).
>3. Since I am doing things in the shell for package development anyway, 
>I tend to call package installation from the shell as well:
>
>R CMD INSTALL foo_x.y-z.tar.gz
>
>Uwe Ligges
>
>
>
>Wayne (Yanwei) Zhang wrote:
>> Thanks. But I after I restarted R, it is still the old version of the package that 
is 
>> loaded. Am I using the update.packages() correctly?
>> Regards,
>> Wayne (Yanwei) Zhang
>> 
>> ______________________________________________
>> R-help at r-project.org 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.
Regards,
Wayne (Yanwei) Zhang



More information about the R-help mailing list