ERROR(s) during compilation

Running example 12.1 from rethinking. This works fine on my laptop. On my work PC I installed rstan to external drive (H:) to avoid a network location. I am getting ‘H:/RPackages/StanHeaders/include/stan/math/rev/core/var.hpp:7:39: fatal error: boost/math/tools/config.hpp: No such file or directory’ as shown below
thanks very much for advice.
Martin

R version 3.4.3 (2017-11-30) – “Kite-Eating Tree”
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

library(rethinking)
data(reedfrogs)
d ← reedfrogs

make the tank cluster variable

d$tank ← 1:nrow(d)

fit

m12.1 ← map2stan(

  • alist(
    
  •     surv ~ dbinom( density , p ) ,
    
  •     logit(p) <- a_tank[tank] ,
    
  •     a_tank[tank] ~ dnorm( 0 , 5 )
    
  • ),
    
  • data=d )
    

In file included from H:/RPackages/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5:0,
from H:/RPackages/StanHeaders/include/stan/math/rev/core.hpp:12,
from H:/RPackages/StanHeaders/include/stan/math/rev/mat.hpp:4,
from H:/RPackages/StanHeaders/include/stan/math.hpp:4,
from H:/RPackages/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file21a455f07e0c.cpp:8:
H:/RPackages/StanHeaders/include/stan/math/rev/core/var.hpp:7:39: fatal error: boost/math/tools/config.hpp: No such file or directory
#include <boost/math/tools/config.hpp>
^
compilation terminated.
make: *** [file21a455f07e0c.o] Error 1
Warning message:

Something went wrong, when calling Stan. Check any debug messages for clues, detective.
Compilation ERROR, function(s)/method(s) not created! In file included from H:/RPackages/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5:0,
from H:/RPackages/StanHeaders/include/stan/math/rev/core.hpp:12,
from H:/RPackages/StanHeaders/include/stan/math/rev/mat.hpp:4,
from H:/RPackages/StanHeaders/include/stan/math.hpp:4,
from H:/RPackages/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file21a455f07e0c.cpp:8:
H:/RPackages/StanHeaders/include/stan/math/rev/core/var.hpp:7:39: fatal error: boost/math/tools/config.hpp: No such file or directory
#include <boost/math/tools/config.hpp>
^
compilation terminated.
make: *** [file21a455f07e0c.o] Error 1
Warning message:
running command 'make -f “C:/PROGRA~1/R/R-34~1.3/etc/x64/Makeconf” -f "C:/PROGRA~1/R/R

What directory is the BH package installed in? Do

system.file(package = "BH")

Thank you, I have now installed BH to H:\
Now it is giving

      from file226c2b9536cc.cpp:8:

H:/RPackages/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: “BOOST_NO_CXX11_RVALUE_REFERENCES” redefined

define BOOST_NO_CXX11_RVALUE_REF

That is fine

Yes, thanks for your advice

Martin