[R] update packages from local

David Winsemius dwinsemius at comcast.net
Sun Jan 3 17:25:04 CET 2010


On Jan 3, 2010, at 11:08 AM, Wayne (Yanwei) Zhang wrote:

> 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.

I thought that the library() function checks to see if it's argument  
is already loaded and ignores the command if it is. I think you need  
to restart R to see if you update was successful.

-- 

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list