R: при запуске функции stan () возникают ошибки: - PullRequest
0 голосов
/ 14 июля 2020

когда я запускаю функцию stan (), я получаю две ошибки: Ошибка в файле (con, "r"): не удается открыть соединение и Ошибка в приемнике (type = "output"): недопустимое соединение. Кстати, мой .stan файл правильный. Пожалуйста, помогите.

> rstan:::rstudio_stanc("8schools.stan")
8schools.stan is syntactically correct.
> schools_dat <- list(J = 8, 
+                     y = c(28,  8, -3,  7, -1,  1, 18, 12),
+                     sigma = c(15, 10, 16, 11,  9, 11, 10, 18))
> fit_8schools <- stan(file = 'C:/Users/.../Desktop/8schools.stan', data = schools_dat)
The NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
 https://github.com/stan-dev/stanc3/issues 
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In file.remove(c(unprocessed, processed)) :
  cannot remove file 'C:\Users\lpb\AppData\Local\Temp\RtmpW6qdvg\file1f7436407ba4.stan', reason 'No such file or directory'
2: In system(cmd, intern = !verbose) :
  running command 'D:/ProgramFiles/R-4.0.2/bin/x64/R CMD SHLIB file1f741c6e1040.cpp 2> file1f741c6e1040.cpp.err.txt' had status 1
3: In file(con, "r") :
  cannot open file 'file1f741c6e1040.cpp.err.txt': No such file or directory
Error in sink(type = "output") : invalid connection

> setInternet2(TRUE) 
Error: 'setInternet2' is defunct.
See help("Defunct")
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...