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.
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.
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.