[R-gui] GUI for require(package)!
John Fox
jfox at mcmaster.ca
Fri Jul 16 04:24:07 CEST 2004
Dear James,
I'll be interested to see what you come up with. I think that my solution is
probably sufficient for the Rcmdr package (actually, I can eliminate the
Bioconductor radio button since at present I only use CRAN packages) and
should be pretty easily adapted. As usual, I'll let things percolate for a
few days to see if I can think of improvements.
Thanks for raising the issue.
John
> -----Original Message-----
> From: r-sig-gui-bounces at stat.math.ethz.ch
> [mailto:r-sig-gui-bounces at stat.math.ethz.ch] On Behalf Of
> James Wettenhall
> Sent: Thursday, July 15, 2004 7:24 PM
> To: John Fox
> Cc: r-sig-gui at stat.math.ethz.ch
> Subject: RE: [R-gui] GUI for require(package)!
>
> Hi John,
>
> Great work!
>
> Yes I agree that it's not too difficult to provide a PACKAGES
> file on a CD. On the other hand, I do still like the idea of
> having a GUI option to install a missing R package from an
> aribtrary place on your hard disk, e.g. your desktop (without
> necessarily having a PACKAGES file). I'll look at your code
> and think about this. (Maybe this is coming from a Windows
> point of view - unlike Mac, it's easy to have multiple R
> installations, e.g. C:\rw1090\ and C:\rw1091\ , so you could
> download an R package and install it within your R 1.9.0
> installation but not your R 1.9.1 installation, and then
> later decide that you want it in R 1.9.1)
>
> In my R packages, I'm not sure if .onLoad() is the right
> place to install _all_ missing R packages, because some of
> the R packages are really only 'recommended' rather than
> 'required', i.e. a complete microarray analysis can be
> performed using my GUI(s), without the 'recommended'
> packages, as long as you don't choose the 'advanced' or
> 'extra-memory-hungry' normalization options.
>
> So I would still like users to be able to run my GUIs without
> some of the 'recommended' packages, but there are certainly
> some packages which are critically required, so maybe they
> could be installed in .onLoad() or .First.lib() if missing.
> For the 'recommended' packages, .onLoad() should not fail if
> they are unavailable, but it could give a warning.
>
> Another thing which could be incorporated into this is the
> new reposTools / install.packages2() / getBioC() methods of
> installation for the case of Bioconductor packages. This may
> not be of general interest to people on this list, but
> obviously I am interested in Bioconductor. The advantage of
> the Bioconductor package-installation methods, is that they
> try to take care of dependencies automatically. I would
> assume that the "Install package(s) from Bioconductor" menu
> item in Rgui for Windows, doesn't yet use this, i.e. it
> probably uses the original install.packages() and a PACKAGES file.
>
> For an example of dependencies, if my limmaGUI package
> depends on limma, but I forget that limma depends on statmod,
> then if limma is missing, install.packages2() in
> Bioconductor's reposTools packages should automatically see
> that statmod is required for limma, and find it on CRAN.
>
> But the reposTools / install.packages2() method can be slow
> sometimes, because it searches multiple repositories for an R
> package. This may be fixed now, but in the past, I found
> that (using the default options), it often searched the wrong
> repository first, e.g. CRAN instead of Bioconductor.
>
> Jeff Gentry is the expert on reposTools, install.packages2(),
> and getBioC(). He also has a widgetInvoke package on
> Bioconductor which could be of interest to Gtk fans on this
> mailing list.
>
> Regards,
> James
More information about the R-SIG-GUI
mailing list