Problems with crashing R session

That Makevars.win is for the RcppEigen package, not your R installation as a whole.

That command referenced the same file as the earlier post, which you can verify by trying to run the command again:

readLines("~/.R/Makevars.win")

Got it.

So the problem may be in the Makevars.win file.

Because the output of the given command is

Error in file (con, "r"): unable to open the connection
In addition: Warning message:
In file (with, "r"):
   could not open file 'D: / Users / Carlos Zarzar / Documents / .R / Makevars.win': No such file or directory

Well in summary. I must change the operating system from Windows to Linux which will probably solve my problem, right?

Hello guys.

Apparently, I believe the problem is really in RStudio because I run (the example is given from Problems with crashing R session) on R-base software (R root) and the stan program works without any crashing RStudio session. And I can say that it runs even faster than RStudio.

Some discussions on the subject can also be found on the Github RStudio forum Rstudio consistently-but-randomly slowing down & crashing when viewing Stan files · Issue #9055 · rstudio/rstudio · GitHub

I have this issue on all three of my Windows laptops. I’ve found no solution so far except to restart R after each run (.rs.restartR())

I am having the same problem in Windows 10.
There was no Document/.R folder and no Makevars.win file.
I created these items manually and then ran
cat("\n CXX14FLAGS += -O3", file = M, sep = "\n", append = FALSE)
However rstan my script still crashed the session in RStudio.
Running from RGui it gets further but still crashes eventually.
The rstan example runs fine.

Maybe running on Linux will help. Also, I believe Stan will be more efficient.