Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
openCPU和rstan-无法打开连接_R_Opencpu_Stan_Rstan - Fatal编程技术网

openCPU和rstan-无法打开连接

openCPU和rstan-无法打开连接,r,opencpu,stan,rstan,R,Opencpu,Stan,Rstan,我正在使用openCPU创建一个API来估计rstan中相当基本的模型 我已经验证了当从普通的R控制台会话调用时,我的函数在我的环境中工作,而不是从openCPU调用 但通过openCPU调用时,响应如下: cannot open the connection In call: file(con, "r") makefiles <- makefiles[file.exists(makefiles)] 通过在rstan的源代码中插入检查点,我跟踪到了R/cxxfumplus.R()中的

我正在使用openCPU创建一个API来估计rstan中相当基本的模型

我已经验证了当从普通的R控制台会话调用时,我的函数在我的环境中工作,而不是从openCPU调用

但通过openCPU调用时,响应如下:

cannot open the connection

In call:
file(con, "r")
makefiles <- makefiles[file.exists(makefiles)]
通过在rstan的源代码中插入检查点,我跟踪到了R/cxxfumplus.R()中的一个调用:


dso解决了这个问题-在openCPU下运行时,
rstan::get_makefile_txt
正在查找的两个makefile中的一个不存在。文件是/usr/share/R/share/make

幸运的是,第一个makefile确实存在并且足够了,因此可以通过跳过第二个makefile并只读取第一个makefile来纠正这一问题

rstan::get_makefile_text
的最后一行之前,我插入了以下内容:

cannot open the connection

In call:
file(con, "r")
makefiles <- makefiles[file.exists(makefiles)]

makefile解决了这个问题-在openCPU下运行时,
rstan::get_makefile_txt
正在查找的两个makefile中的一个不存在。文件是/usr/share/R/share/make

幸运的是,第一个makefile确实存在并且足够了,因此可以通过跳过第二个makefile并只读取第一个makefile来纠正这一问题

rstan::get_makefile_text
的最后一行之前,我插入了以下内容:

cannot open the connection

In call:
file(con, "r")
makefiles <- makefiles[file.exists(makefiles)]

makefiles感谢您让我们知道。你能在你的答案中添加任何你只需要读取第一个makefile的内容吗?好的。我在GitHub上为rstan的开发分支添加了这一行。感谢您让我们知道。你能在你的答案中添加任何你只需要读取第一个makefile的内容吗?好的。我将该行添加到GitHub上rstan的开发分支。