0

I was trying to run code that required the R packages ‘pkgDepTools’ and ‘Rgraphviz’. I received error messages saying that neither package is available for R version 2.15.0.

A Google search turned up the following webpage RPM Pbone that seems to have the packages:

http://rpm.pbone.net/index.php3/stat/4/idpl/17802118/dir/mandrake_other/com/R-pkgDepTools-1.20.0-1-mdv2012.0.i586.rpm.html

and

http://rpm.pbone.net/index.php3/stat/4/idpl/17802080/dir/mandrake_other/com/R-Rgraphviz-1.32.0-2-mdv2012.0.i586.rpm.html

However, the files have an *.rpm extension rather than the *.tar.gz or *.zip extensions I am used to.

I am using Windows 7 and R version 2.15.0. Can I install an R package from an *.rpm file?

From Wikipedia *.rpm seems like maybe it is more for Linux:

http://en.wikipedia.org/wiki/RPM_Package_Manager

Regarding other possible solutions, I have found several earlier posts here with similar questions about installing R packages that are not available for the most recent version of R:

Bivariate Poisson Regression in R?

Package ‘GeneR’ is not available

R Venn Diagram package Venerable unavailable - alternative package?

I have installed the latest version of Rtools and the package 'devtools'. Although I know nothing about them.

There is an archived version of 'Rgraphviz' here:

http://cran.r-project.org/src/contrib/Archive/Rgraphviz/

but I cannot locate an archived version of 'pkgDepTools'.

If I can install the packages on a Windows machine using the above *.rpm files could someone please provide instructions?

If I must use Rtools to build them I might ask more questions because the instructions at the link below are challenging for me:

http://cran.r-project.org/doc/manuals/R-admin.html#Building-from-source

To be completely transparent I am hoping someone might build them for me, if that is possible. Although I recognize the experience and knowledge gained from doing it myself would probably pay off in the long run.

Thank you for any advice.

Community
  • 1
  • 1
Mark Miller
  • 12,483
  • 23
  • 78
  • 132

2 Answers2

5

pkgDepTools and Rgraphviz are BioConductor R packages not ones hosted on CRAN. Unless you configure your R to download packages from those repos, R will report that they are not available; it can only install from repos it has been configured to install from.

To install those BioConductor packages a lite installation method is provided:

source("http://bioconductor.org/biocLite.R")
biocLite(c("pkgDepTools", "Rgraphviz"))

Further details are provided on the Install page of the BioConductor website

In general you can't use rpm packages on Windows; rpm's are the equivalent of a binary package for Linux. Any C/C++/Fortran/etc code will have been compiled for Linux not Windows. If a package really isn't available for your version of R then check if there is a reason stated on CRAN (usually Windows binaries take a few days longer to produce or there may be requirements for software not available on the CRAN Windows build machines). You can try the WinBuilder service run by Uwe Ligges to build Windows Binaries of packages for you, but if the package was on CRAN and now isn't that suggests it no longer works with current R and can not be built.

In general try a wider search for packages; the first hit in my Google search results under the search string "pkgDepTools" is the Bioconductor page for the package which includes a link to the Windows binary and instructions on how to install the package from within R.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
  • The two lines you provided seemed to work. However, when I typed library('pkgDepTools') I got a pop-up error message that states 'DP_LocalAvatar: Rgui.exe - System Error' 'The program can't start because libcdt-4.dll is missing from your computer. Try reinstalling the program to fix the problem.' Within R itself I get an error that says there is no R package 'pkgDepTools'. Does this mean I must uninstall R? – Mark Miller May 27 '12 at 09:29
  • Actually the error is caused by Rgraphvis, not pkgDepTools. Here is a similar report from 2009 http://r.789695.n4.nabble.com/Rgraphviz-install-td878526.html I will wait until morning to look into it more. – Mark Miller May 27 '12 at 10:12
  • I have gone ahead and clicked the checkmark, but after 7 hours of trying I have not been able to install Rgraphviz. I have found several other posts on the internet expressing the same problem over a period of several years, but no clear solution. I will contact Bioconductor. If they can assist in installing Rgraphviz I will post the solution here. – Mark Miller May 27 '12 at 20:48
0

I think this merits an answer rather than a comment.

A gentleman at Bioconductor helped me get Rgraphviz installed. The primary problem was that the version of Rgraphviz I had downloaded only seems to work with the 32-bit version of R and I was running a 64-bit version of R. I was able to install Rgraphviz in the 32-bit version of R.

I had also made an error or two in the PATH statement during some of my attempts to install Rgraphviz. However, the post above in my second comment provides the instructions for installation.

You just, it seems, cannot install the normal download version of Rgraphviz in the 64-bit version of R.

I think many of our emails back and forth are now posted on the Bioconductor forum.

I might edit this answer with more detailed instructions in the next 24-hours.

Mark Miller
  • 12,483
  • 23
  • 78
  • 132