> install.packages("rstan", dependencies=TRUE)
Installing package into ‘/usr/local/google/home/shyuemingloh/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘loo’ is not available
Content type 'application/x-gzip' length 1093296 bytes (1.0 Mb)
opened URL
==================================================
downloaded 1.0 Mb
* installing *source* package ‘rstan’ ...
** package ‘rstan’ successfully unpacked and MD5 sums checked
** libs
[some output]
In file included from [usr/local/ folder]/home/shyuemingloh/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:4:0,
from chains.cpp:19:
[usr/local/ folder]/home/shyuemingloh/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4:23: fatal error: Eigen/Dense: No such file or directory
#include <Eigen/Dense>
^
compilation terminated.
make: *** [chains.o] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘[usr/local/ folder]/home/shyuemingloh/R/x86_64-pc-linux-gnu-library/3.1/rstan’
I've omitted the usr/local/ folder in the paths above, for confidentiality's sake.
I am not sure whether the error is due to the fact that the loo package is not installed. Here's my session info:
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.1.1
The loo package is only available for R 3.1.2 and above.