The latest version of xts on CRAN is 0.7-5. But I'd like to try out the blotter package, for which xts >= 0.7.6.17 is required. To get this latest version, I first I downloaded the .tgz file from RForge and tried:
[Downloads]$ R CMD INSTALL xts_0.7-6.17.tgz
WARNING: ignoring environment value of R_HOME
* installing to library ‘/Library/Frameworks/R.framework/Resources/library’
* installing *binary* package ‘xts’ ...
* DONE (xts)
After launching R console, I typed require(xts) and got this:
> require(xts)
Loading required package: xts
Loading required package: zoo
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/xts/libs/x86_64/xts.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/xts/libs/x86_64/xts.so, 6): Library not loaded: /usr/local/lib/libgfortran.2.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/xts/libs/x86_64/xts.so
Reason: image not found
In addition: Warning message:
package 'xts' was built under R version 2.12.2
I reverted to the CRAN version by downloading that file and running this again:
[Downloads]$ R CMD INSTALL xts_0.7-5.tgz
WARNING: ignoring environment value of R_HOME
* installing to library ‘/Library/Frameworks/R.framework/Resources/library’
* installing *binary* package ‘xts’ ...
* DONE (xts)
Opening R console and typing in require(xts):
> require(xts)
Loading required package: xts
Loading required package: zoo
>
All is well again, except I need to RForge version to get blotter installed.
NOTE: I'm running OS X (10.6.6)
UPDATE: all is NOT well. Now I can't get the CRAN xts version to load properly.
UPDATE #2: I got my old xts back by running install.packages("xts", repo="http://cran.r-project.org"). Actually, I ran it for "quantmod" and "TTR" as well because all manner of mysterious breaking was occurring.
UPDATE #3: Following Dirk's recommendation in comments below, I've attempted to compile from source on OS X and was met with
make: gfortran: No such file or directory
So after installing from the link at http://www.macresearch.org/xcode_gfortran_plugin_update, I'm now faced with a new error complaining about the -arch flag:
gfortran -arch i386 -fPIC -g -O2 -c period.max.f -o period.max.o
f951: error: unrecognized command line option "-arch"
UPDATE #4: I installed the wrong fortran compiler in UPDATE #3. Don't use that compiler for R packages.