Re: [R] Windows-GUI: "Install Packages from local zip files" and dependencies

From: Johannes Graumann <johannes_graumann_at_web.de>
Date: Mon, 18 Feb 2008 13:51:14 +0100

Duncan Murdoch wrote:

>> 2) If that's not the default: is there a way to make it so?

>
> Not simply, but of course it's possible with some work. The problem is
> that with repos = NULL, R doesn't know where to look for dependencies.
> So you need to make two passes: First, install the package, and second,
> install its dependencies.
>
> You can use code like this to find the dependencies:
>
> library(tools)
>
> allpkgs <- installed.packages()
> deps <- package.dependencies(allpkgs["test",])[[1]][,1]
>
> to find the dependencies of package test after you've installed it, and
>
> setdiff(deps, rownames(allpkgs))
>
> to find the ones that are not installed. Where to find them to install
> is the hard part: are they also local, or on CRAN, or where?
CRAN/BioC (both of which are set to Default == TRUE in the repository conf file.

This doesn't sound like something I can automate easily to appease the userbase of my little toolbox ...
Is there a way to have a package upon installation run a post-install script with the functions you outline above?

Thanks for any hints, Joh



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. Received on Mon 18 Feb 2008 - 12:53:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Feb 2008 - 14:00:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive