Building R package from source requires installation of additional build tools

Short summary of the problem

code_to_run_your_model(if_applicable)
```#This is not in parallel, so it will take forever
                  for (i in 15:ntraits) {
                  cat("Working on trait: ",i, "/c")
                    dir.create(paste0(i))
                      setwd(paste0('C:/Users/Marina/Documents/Dropbox/Microbioma IMF/Nuevos datos/Line Effect/',i))
                    y <- DB[,7+i]
                    data <- DB[,c(1:7)]
                    data <- cbind(data,y)
                    model1<-brm(y~LINEA+WK+SEQ+SEXO+OP+(1|c),data = data,iter=50000,warmup=10000,thin=10,seed=1234)
                          #write results
                          write.table(summary(model1)$fixed, file="Fixed_solutions.csv")
                          write.table(summary(model1)$random, file="Random_solutions.csv")
                          write.csv(VarCorr(model1)$residual$sd, file="ResidualVar.csv")
                          #Write the hypothesis
                          df <- as.data.frame(hypothesis(model1,"LINEA2<0")[1])
                          df <- rbind(df,as.data.frame(hypothesis(model1,"WK2<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"WK3<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"WK4<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"WK5<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"WK6<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"SEQ2<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"SEXO2<0")[1]))
                          df <- rbind(df,as.data.frame(hypothesis(model1,"OP2<0")[1]))
                          write.csv(df, file="Hypoyhesis.csv")
                          setwd('C:/Users/Marina/Documents/Dropbox/Microbioma IMF/Nuevos datos/Line Effect')
                          #Graph variances
                          #jpeg("Variances.jpeg") #Save the graph
                          #plot(plot(model1, ask = FALSE))
                          #dev.off()
                  }

If possible, add also code to simulate data or attach a (subset of) the dataset you work with.

Please also provide the following information in addition to your question: 

* Operating System: Windows 10
* brms Version: last version



Looking forward to your topic!

Hi, I am sorry but I don’t understand what your question is?

Hi Paul!

Thanks for answering.

My question was about a pop-up message everytime I run a model (example):
model1<-brm(y~LINEA+WK+SEQ+SEXO+OP+(1|c),data = data,iter=50000,warmup=10000,thin=10,seed=1234)

The pop-up message was:
“Building r package from source requires installation of additional build tools. Do you want to install it now?”
If I answer NO the the model successfully runs, and I get my solutions. Since I am running the model in a loop of 4000 traits, I blocked to pop-up
message using the code:
options(buildtools.check = function(action) TRUE)

So I have this issue solved.

However, I want to know what additional tools R wants to install, and to do it so R is completely happy. If I answer YES to the pop up message then starts the download of Rtools3.5.exe - the system also ask to uninstall my previous version of Rtools, and I do it. Once the download and installation is finished, I run the model again but the pop-up message keeps coming.
I have to say I have 3.6.1 R version and my previous version of Rtools was rtools 4, as found in the official cran.org project webpage.
Do you know how can I manage to achieve the proper installation of Rtool3.5.exe ?

Many thanks,
Marina

3 Likes

I think this is an issue with Rstudio not detecing the tool chain in some case. At least, I am running into the same problem at times. Perhaps you could look at the Rstudio github website and see if someone already raised this issue and perhaps if it has been fixed already. In any case, this has not really something to do with brms or Stan but I would think that several users would appreciate a solution for this.

Thanks Paul! I will have a look then
BW!
Marina