As the title suggests, I am receiving the error message:
Error in sink(type = "output") : invalid connection
Most topics around this issue seem to revolve around reinstalling a certain library.
This may be the solution for me, but before I do that I think the following is interesting:
I have a .stan file, “a.stan”. I can run “a.stan” from R Studio. If I copy the .stan file to “a2.stan”, and try to run the R code again the code does not run. I have to cancel the code and I get the error shown above.
I am confused as to why I get the error for new .stan files, but not my old ones. I am worried that if I reinstall stan, my older .stan files will not work (I could just copy them to the newer version but I think this is an interesting situation).
I would understand if, for example, I installed a new version of R and my older .stan files were not working as I did not load a new library, or if I went back to an old version of R and had to reinstall stan to match the older version of R.
However, I am saying that my .stan files are working in R. I only have an issue if I create a new .stan file.
Can anyone advise with this?
I will add that I am not using R on my computer. I am using my universities cloud server. Perhaps an admin update could have caused this?
I am still confused since I imagined that a .stan file would work on any version of R. I thought I would just have to update the R version not change the .stan file itself.