1

I am trying to install 'indexing' package in r: R-Forge

However, It says it is "failed to build" & am looking for a way to fix this? I do not see a download option for the package.... I am currently on MAC OSX Yosemite and trying to load this in the latest R-Studio.

R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

When trying to load via r-studio:

install.packages("indexing", repos="http://R-Forge.R-project.org")
> source repository is unavailable to check versions
> Error in install.packages : Line starting '<!DOCTYPE HTML PUBLI ...' is malformed!    
FXQuantTrader
  • 6,821
  • 3
  • 36
  • 67
Rime
  • 912
  • 2
  • 11
  • 39
  • Could you share the log output and the error message? –  Aug 31 '15 at 07:22
  • @Pascal I have updated my code, – Rime Aug 31 '15 at 07:27
  • According to the page you linked, the build status is "Failed to build". –  Aug 31 '15 at 07:44
  • @pascal yeah i mentioned that, but i am trying to find a way to fix it if possible, & could not find any mirrors – Rime Aug 31 '15 at 07:47
  • 1
    Yes, sorry, my mistake. This package is not distributed through CRAN. And according to the same page, build is successful until R version 3.0.0. For more recent version, as yours, it fails. And as you mentioned, there is not access to the source. So, I guess there is no solution to build this package. –  Aug 31 '15 at 07:54
  • @pascal I see, However I did find the following describing on rebuilding http://r.789695.n4.nabble.com/Indexing-Package-td4594298.html – Rime Aug 31 '15 at 07:58
  • Yes, me too. But as the download link was frozen in-between, you cannot access the source of the package. –  Aug 31 '15 at 07:59

1 Answers1

1

Even though the download link on R-forge doesn't appear to work any more (it may say not available for version >= 3.3. etc), you can still install indexing from source on OSX (or any other operating system).

Open a new terminal in OS X, and in a directly of your choice type the following to install indexing:

svn checkout svn://svn.r-forge.r-project.org/svnroot/indexing/

If you did this correctly, type ls in the terminal and you should see a new directory called indexing. Inside this directory is the source code you need to build the indexing package.

Without changing from the current directory, install the dependency R package mmap if you don't already have it (you might have already installed in from CRAN, in which case you may be able to skip this step) with:

R CMD INSTALL indexing/pkg/mmap

Finally, install indexing from source

R CMD INSTALL indexing/pkg/indexing

You should see something like this in the terminal output if successful:

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’
* installing *source* package ‘indexing’ ...
** libs
make: Nothing to be done for `all'.
installing to /Library/Frameworks/R.framework/Versions/3.3/Resources/library/indexing/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (indexing)

Enjoy!

FXQuantTrader
  • 6,821
  • 3
  • 36
  • 67
  • where have you been this past 1 year & 8 months!? lol thank you it worked @FXQuantTrader – Rime May 07 '17 at 22:23