I have a error about Error in file(con, "r") : cannot open the connection from running BRugsFit(). I assume all the input arguments are fine, and the calling code is
> output = BRugsFit("model.txt", data, inits, numChains = 2, seed=6, parametersToSave,nBurnin = 100,nIter = 1000, nThin = 5, coda = T,digits = 5)
****
* BlackBox
* string too long
- HostFiles.Init (pc=00003FB1, fp=BFFDE550)
- HostFiles.$$ (pc=0000000A, fp=BFFDE560)
****
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file '/tmp/RtmpU7v9PZ/buffer.txt': No such file or directory
So I wonder what might be the reason of the error, and how to solve it? Thank you so much!
It tells you that the file model.txt doesn't exist. Try to indicate the full path to the file:
output <- BRugsFit("/path/to/file/model.txt", data, inits, numChains = 2, seed=6, parametersToSave,nBurnin = 100,nIter = 1000, nThin = 5, coda = T,digits = 5)
or first set the working directory with setwd:
setwd("/path/to/file/")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With