0

I'm trying to use https://cran.r-project.org/web/packages/littler/vignettes/littler-examples.html#install2r:_With_Cmdline_Parsing to install some packages during which I get the error dependency 'graph' is not available. It appears that this package is available from Bioconductor project (https://www.bioconductor.org/packages/release/bioc/html/graph.html) but I don't know how to install it using install2.r.

So, specifically how can I install bioconductor packages using install2.r?

Vijay
  • 151
  • 1
  • 11

1 Answers1

4

You can't because BioConductor uses a different repository structure.

But because this is a frequent-enough problem, I recently added a helper script installBioc.r you use. To use it, first do

 install.r littler BiocManager

to make sure we have the current littler release as well as the BioC package BiocManager we need. Then use eg

  /usr/local/lib/R/site-library/littler/examples/installBioc.r S4Vectors

and it will go off and install BiocVersion, S4Vectors as well as the dependency BiocGenerics.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • Thanks Dirk! One more question: since I'm aware that one of the packages depends on `graph` from Bioconductor I ought to run `installBioc.r graph` before running `install2.r `? Relatedly, is it possible that `install2.r` can suggest downloading the missing package from Bioconductor as a part of error/warning? BTW, I really like using install2.r and rocker (mostly for geospatial related R work)! I cannot thank you enough for all that you do for the R community. I, personally, appreciate all of it! – Vijay Jun 18 '20 at 18:33
  • Thanks for the kind words, and good question. I am a little fuzzy on this but now also have some containers needed BioC packages (hence the new helper). I tend to bring in from CRAN what I need but I _think_ as we call out to `BiocManager` it would bring whatever we need from CRAN too. (And the old problem of system libraries is of course unsolved as the CRAN + BioC installers do not interact with `apt`, but I presume you knew that....) – Dirk Eddelbuettel Jun 18 '20 at 18:40
  • 1
    Dealing with system libraries is a difficult problem...especially getting geospatial packages working _reliably_ in R...so I completely understand. Thank you. – Vijay Jun 18 '20 at 19:09