5

There is a bug in the current latest version of doRedis (1.1.0), and the downgrade to version 1.0.5 is recommended. However, I have not been able to install the 1.0.5 package into R 3.0.1 on Windows XP!

I tried to follow the answers of the question "Installing older version of R package":

  1. The answer of Thomas doesn't work for me:

    url <- 'http://cran.r-project.org/src/contrib/Archive/doRedis/doRedis_1.0.5.tar.gz'
    install.packages(url, contriburl=NULL, type="source")
    # Warning message:
    # package ‘http://cran.r-project.org/src/contrib/Archive/doRedis/doRedis_1.0.5.tar.gz’ is not available (for R version 3.0.1)
    
  2. The direct compilation (answer of Mark Butler) - doesn't work for me either, not even after uninstalling the previously installed version, not even after installing devtools:

    c:\Program Files\R\R-3.0.1\bin>R CMD INSTALL doRedis_1.0.5.tar.gz
    * installing to library 'c:/Program Files/R/R-3.0.1/library'
    * installing *source* package 'doRedis' ...
    ** package 'doRedis' successfully unpacked and MD5 sums checked
    ** libs
    ERROR: compilation failed for package 'doRedis'
    * removing 'c:/Program Files/R/R-3.0.1/library/doRedis'
    
  3. I tried to get the old windows binary zip file for R 2.14. R installs the package but when trying to load it I get the following error:

    utils:::menuInstallLocal()
    # package ‘doRedis’ successfully unpacked and MD5 sums checked
    require(doRedis)
    # Loading required package: doRedis
    # Failed with error:  ‘package ‘doRedis’ was built before R 3.0.0: please re-install it’
    
  4. I also tried to use function install_url from package devtools as proposed by asieira:

> require(devtools)
> url <- 'http://cran.r-project.org/src/contrib/Archive/doRedis/doRedis_1.0.5.tar.gz'
> install_url(url)
Downloading doRedis_1.0.5.tar.gz from http://cran.r-project.org/src/contrib/Archive/doRedis/doRedis_1.0.5.tar.gz
Installing package from C:\DOCUME~1\Tomas\LOCALS~1\Temp\RtmpwVmfgt/doRedis_1.0.5.tar.gz
Installing doRedis
pdflatex not found. Not building PDF vignettes.
"C:/PROGRA~1/R/R-30~1.1/bin/i386/R" --vanilla CMD build "C:\Documents and Settings\Tomas\Local  \
  Settings\Temp\RtmpwVmfgt\devtoolse4025f918\doRedis" --no-manual --no-resave-data --no-vignettes 

* checking for file 'C:\Documents and Settings\Tomas\Local Settings\Temp\RtmpwVmfgt\devtoolse4025f918\doRedis/DESCRIPTION' ... OK
* preparing 'doRedis':
* checking DESCRIPTION meta-information ... OK
* cleaning src
Warning in cleanup_pkg(pkgdir, Log) :
  unable to run 'make clean' in 'src'
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'doRedis_1.0.5.tar.gz'

"C:/PROGRA~1/R/R-30~1.1/bin/i386/R" --vanilla CMD INSTALL "C:\DOCUME~1\Tomas\LOCALS~1\Temp\RtmpwVmfgt/doRedis_1.0.5.tar.gz"  \
  --library="C:/Program Files/R/R-3.0.1/library" --install-tests 

* installing *source* package 'doRedis' ...
** libs
ERROR: compilation failed for package 'doRedis'
* removing 'C:/Program Files/R/R-3.0.1/library/doRedis'
Error: Command failed (1)

Is there any way how to install the older package into R 3.0.1?

EDIT: output of sessionInfo():

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Czech_Czech Republic.1250  LC_CTYPE=Czech_Czech Republic.1250    LC_MONETARY=Czech_Czech Republic.1250
[4] LC_NUMERIC=C                          LC_TIME=Czech_Czech Republic.1250    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_1.4.1

loaded via a namespace (and not attached):
[1] digest_0.6.4   evaluate_0.5.1 httr_0.3       memoise_0.1    parallel_3.0.1 RCurl_1.95-4.1 stringr_0.6.2  tools_3.0.1   
[9] whisker_0.3-2
Community
  • 1
  • 1
Tomas
  • 57,621
  • 49
  • 238
  • 373
  • Can you provide the output of `sessionInfo()` and is RTools installed? – Dason Mar 26 '14 at 21:39
  • @Dason, please see the updated question. No, I don't have RTools installed but I can do it if it helps (?) – Tomas Mar 26 '14 at 21:46
  • 1
    You need RTools to install packages from source on Windows if they contain any non-R source code. – Dason Mar 26 '14 at 21:50
  • @Thomas as you might have noticed, my question already refers that question, so it is not a duplicate. I refer it and consult why all those different answers there do not work. – Tomas Jan 21 '15 at 12:35

1 Answers1

5

You need to install Rtools if you want to build packages from source on Windows. The error messages you are getting are saying that compilation failed - this makes sense if you don't have Rtools since you don't have the necessary tools to compile the source code.

Dason
  • 60,663
  • 9
  • 131
  • 148
  • 1
    I tried to install RTools and then used the `install_url` compilation tool and **it works!!!** (I had to quit R first and start it again). Thanks a lot! – Tomas Mar 26 '14 at 22:06
  • @TMS I have the same problem, but in addition I can't seem to be able to install Rtools: when I use `install.Rtools()` I get `No need to install Rtools - You've got the relevant version of Rtools installed`, and the command `library(Rtools)` returns `Error in library(Rtools) : there is no package called ‘Rtools’` ?? – Antoine Jul 16 '15 at 09:09
  • 2
    Rtools isn't an R package so that isn't surprising. – Dason Jul 16 '15 at 11:54