Question

I am running R 3.0.2 and trying to install gplots on Mac OSX 10.9, CentOS 6.4 and 5.4. But it fails on all platforms. The main reason should be that gdata requires gtools and gtools requires gdata.

So if one tries to install gtools or gdata alone, it stops you by

> install.packages("gtools")
also installing the dependency ‘gdata’
...
ERROR: dependency ‘gtools’ is not available for package ‘gdata’
ERROR: dependency ‘gdata’ is not available for package ‘gtools’

However, based on CRAN package info, the dependency tree should be

gplots --> gdata --> gtools
A --> B: A depends on B

So is there any workaround or should this be reported upstream?

EDIT:

I managed to install them by modifying gtools's source code:

> download.packages("gtools", destdir=".")  # currently 3.2.0

untar it (tar zxf ./gtools_3.2.0.tar.gz) then remove the line in file DESCRIPTION

# in gtools/DESCRIPTION
Imports: gdata  # <-- remove this line

Then install gtools locally

> install.packages("gtools", repos=NULL)
...
file ‘DESCRIPTION’ has the wrong MD5 checksum
...

It should be successfully installed thus the cyclical dependency is resolved. One can finish all the rest by

> install.packages("gplots")

This solution is originally given by Wush Wu.

Was it helpful?

Solution

I'm the maintainer of gtools.

There is, indeed, a cyclic dependency in gtools 3.2.0, which I pushed to CRAN on Saturday.

CRAN has rolled gtools back to 3.1.1 (which preceded the problem) and I've just submitted gtools 3.2.1 to CRAN (which corrects the problem).

-Greg

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top