Run programes questions

when i run programes with rstan in R4.0.4 encounted:

Error in open.connection(con, open = mode) :
Timeout was reached: [] Operation timed out after 10000 milliseconds with 0 out of 0 bytes received
except: Warning messages:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘C:/Rtools/mingw_/bin/g++’ not found

how to fix this?

When you first load rstan, run rstan_options(javascript=FALSE). This stops RStan from downloading a component of the next RStan version to test whether a specified model will still run.

For example:



that works, but now i meet another problem that is R Session Aborted(R encountered a fatal error, the sesion was terminated) when the programes runned many times( because i want the average result).

R will crash if you repeatedly assign to the same output object, try assigning the result of each run to a different object

What do you mean by this? How are you running your code?