Installation problems brms after following latest installation manual


#1

Dear all,
I was trying to install brms and rstan on Windows (latest version of R and RStudio) while following the most recent installation manual (https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started). Throughout the installation I installed RTools via Rstudio following the popup and everything seemed to work fine. In the end I was able to install brms via install.packages without errors and also load the package without errors. However, when compiling a simple model the following error occurs:

“> brm1 <- brm(Control ~ 1, data = parenting)
Compiling the C++ model
Error in system(cmd, intern = !verbose) : ‘D:/Program’ not found
In addition: Warning message:
Rows containing NAs were excluded from the model.
Error in sink(type = “output”) : invalid connection”

A google search couldn’t help as I was not able to find any errors related to brms and the sink function.

Help is greatly appreciated.

Cheers,
Nicole


#2

What is the output of

pkgbuild::has_build_tools(debug = TRUE)

?


#3

The output is True


#4

Can you try

library(rstan)
stancode <- 'data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}'
mod <- stan_model(model_code = stancode)
fit <- sampling(mod, data = list(y_mean = 0), verbose = TRUE)

and tell us what the output is near where it says error:


#5

I’ll send you the output once my student tried it out (it isn’t my own laptop). I had another thought though. I only now noticed the first error message. This one might related to the location of R. If it contains spaces this might cause the first error. I cannot verify it at the moment because it was on a student’s laptop but I will post an update after trying it out.


#6

Yes, I think it is related to a combination of spaces between Program and Files, not putting quotes around something somewhere, and maybe a weird configuration to begin with.