Debug Error in file(con, "r"): cannot open the connection private$.run()
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
hello
Summary:
Wrong when calling rstan with Jamovi
Description:
I am trying to develop jamavi's modules with rstan.
But when I used the module in jamovi, I got an error:
Debug Error in file(con, "r"): cannot open the connection private$.run()
stan_model(model_code = mode)
cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap("", model_name, "");", sep = ""), includes = inc, plugin = "rstan", save_dso = sav pkgbuild::with_build_tools(cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, ..., verbose = verbose)) withr::with_path(rtools_path(), code) force(code)
cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, ..., verbose = verbose) compileCode(f, code, language = language, verbose = verbose) readLines(errfile)
file(con, "r")
I tried to ask the developer of jamovi, but the developer of jamovi did not find the reason why stan throws this error. So I would like to ask the developer of stan how to solve this error.
My English is not very good, so I sent this post with Google Translate. There may be places that are difficult to understand. sorry.
Reproducible Steps:
I uploaded the jamovi module and development files to my Google Cloud.
module
.stan file
development files
I want to reproduce this error by installing a .jmo file in jamovi.
Expected Output:
post-warmup draws per chain=25000, total post-warmup draws=1e+05.
mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhatmu1 20.66 0.00 1.28 18.14 19.82 20.66 21.50 23.18 94333 1
mu2 16.96 0.01 1.60 13.81 15.91 16.95 18.02 20.11 96909 1
sigma1 6.91 0.00 0.96 5.35 6.23 6.81 7.48 9.08 85519 1
sigma2 8.65 0.00 1.21 6.67 7.80 8.52 9.35 11.41 83641 1
delta 3.70 0.01 2.04 -0.34 2.34 3.70 5.06 7.72 95973 1
delta_over 0.96 0.00 0.19 0.00 1.00 1.00 1.00 1.00 78298 1
lp__ -147.07 0.01 1.46 -150.75 -147.78 -146.73 -145.99 -145.26 47127 1Samples were drawn using NUTS(diag_e) at Tue Nov 06 23:14:54 2018.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at
convergence, Rhat=1).
RStan Version:
packageVersion("rstan")
[1] ‘2.18.1’
R Version:
R.version.string
[1] "R version 3.5.1 (2018-07-02)"
Operating System:
windows10: 17134.345
Jamovi: jamovi-0.9.5.8-win64
Thank you
Jinghao
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the error with the linked jamovi module, .stan file, and development files on the stated Windows, R, RStan, and jamovi versions. Trace the reported path from stan_model(model_code = mode) through compileCode and readLines(errfile), then compare the jamovi run with a standalone RStan run. Done means identifying the environment or integration cause and documenting a verified resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100