I am trying to install rstan on windows but run into multiple problems. Firstly, when I run pkgbuild::has_build_tools(debug = TRUE) it returns FALSE. Also, when I try to run the schools example fit <- rstan::stan(file = '8schools.stan', data = schools_dat, chains = 4, iter = 10000, warmup = 5000), I get the following error:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from C:/Users/user/Documents/R/R-3.6.1/library/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_log.hpp:5:0,
from C:/Users/user/Documents/R/R-3.6.1/library/StanHeaders/include/stan/math/prim/mat.hpp:278,
from C:/Users/user/Documents/R/R-3.6.1/library/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/Users/user/Documents/R/R-3.6.1/library/StanHeaders/include/stan/math.hpp:4,
from C:/Users/user/Documents/R/R-3.6.1/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file6c404aad10b6.cpp:14:
Compilation ERROR, function(s)/method(s) not created!
Error in compileCode(f, code, language = language, verbose = verbose) :
Warning message:In system(cmd) : 'make' not found