Comments (13)
Hmm, is this something that's only happening for this particular model or does it happen when you use shinyStan with any model?
If your stanfit object isn't too big then you could share a dropbox link or google drive or something (even github). If not then the best option is probably to make a post to the Stan users forum because it will let you upload your model code, data, etc.
from shinystan.
Ok, I uploaded the saved fit object to dropbox:
https://www.dropbox.com/s/c837lzhws5s5y9v/auto-error.gz?dl=0
This is the first model I tried to use shinystan with.
Let me know if you need any of the model or data files.
from shinystan.
Thanks for sending. I'm actually not getting those errors with your stanfit object.
A few follow up questions:
- Do the multiview and autocorrelation pages cause this error if you use the shinyStan demo instead of your own model? (you can run that with
launch_shinystan_demo()
and then enter 1 to use the default demo). - Do have R version 3.1.1 or 3.1.2?
My first thought is that something went wrong during installation. Can you try reinstalling shinyStan? Except instead of installing it the way it suggests in the installation instructions try installing it straight from the 'develop' branch:
# restart R session
remove.packages("shinyStan")
devtools::install_github("stan-dev/shinystan", ref = "develop")
# restart R session
library(shinyStan)
Let me know if that fixes the issue and if not I'll come up with a few other things to try.
from shinystan.
I re-installed shinyStan from github as you suggested. The demo failed with the same diagnostics as before as did my model.
I am running R ver. 3.1.2
from shinystan.
I also got the following warnings after the first launch; I don't know if they are relevant.
Loading...
For large models shinyStan may take a few moments to launch.
Listening on http://127.0.0.1:6921
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
Attaching package: ‘xts’
The following objects are masked from ‘package:dplyr’:
first, last
from shinystan.
First of all, sorry it's not working for you! If you're willing to keep trying a few things we'll get this sorted out.
Regarding those warnings:
- The first one about large models is just a message letting people know it might take a bit to start up for really big models.
- The ones about objects being masked from packags are letting you know that packages that are loaded have functions with the same names as other functions from other loaded packages. This can be problematic in some circumstances but shouldn't be here. (Just in case you can try not loading
dplyr
before running shinyStan, but I've never had a problem with running shinyStan withdplyr
loaded.)
The next thing that would be helpful is if you can doing the following:
- launch shinyStan
- get it to fail again on autocorrelation or multiview
- without restarting R run
sessionInfo()
and copy the output that gives you and send it?
sessionInfo()
should just give you a bunch of text listing packages and other info. And you'll be able to just copy and paste the text. It's possible I'll see something in sessionInfo()
that might be problematic, but if not it will at least allow me to rule out a few possibilities.
A few other comments:
- I still don't think it's a linux issue, but I will double-check with some of the other Stan developers who are more familiar with linux than I am.
- If I can't figure out what's going soon then while I'm working on it I'll make a branch on GitHub that has all of shinyStan except for the parts giving you errors so you can install from that branch and at least have a version that doesn't fail on you.
from shinystan.
Here's the output after the demo fails:
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] xtable_1.7-4 threejs_0.2.1 xts_0.9-7 zoo_1.7-11
[5] dygraphs_0.4.1 reshape2_1.4.1 gtools_3.4.1 dplyr_0.4.0
[9] plyr_1.8.1 rstan_2.5.0 inline_0.3.13 Rcpp_0.11.3
[13] shinyStan_1.0.0 shinyBS_0.50 shiny_0.11.1 ggplot2_1.0.0
loaded via a namespace (and not attached):
[1] assertthat_0.1 base64_1.1 colorspace_1.2-4 compiler_3.1.2
[5] DBI_0.3.1 digest_0.6.8 grid_3.1.2 gtable_0.1.2
[9] htmltools_0.2.6 htmlwidgets_0.3.2 httpuv_1.3.2 labeling_0.3
[13] lattice_0.20-29 lazyeval_0.1.10 magrittr_1.5 MASS_7.3-35
[17] mime_0.2 munsell_0.4.2 proto_0.3-10 R6_2.0.1
[21] rjson_0.2.15 RJSONIO_1.3-0 scales_0.2.4 stats4_3.1.2
[25] stringr_0.6.2 tcltk_3.1.2 tools_3.1.2 yaml_2.1.13
from shinystan.
Ok thanks. I'll take a look.
On the advice of Stan developer @bgoodri, can you execute options(error = recover)
in R, and after doing that run shinyStan again and trigger the error. R should then give you some output about the error that you can copy and send.
from shinystan.
Here's the output:
launch_shinystan_demo()
Listening on http://127.0.0.1:6921
Error in eval(substitute(expr), envir, enclos) :
invalid subscript type 'closure'
Error: invalid subscript type 'closure'
Enter a frame number, or 0 to exit
1: launch_shinystan_demo()
2: launch_demo(eight_schools)
3: shiny::runApp(system.file("shinyStan", package = "shinyStan"))
4: shinyCallingHandlers(while (!.globals$stopped) {
serviceApp()
Sys.sle
5: withCallingHandlers(expr, error = function(e) {
handle <- getOption("shi
6: serviceApp()
7: service(timeout)
8: run(timeoutMs)
Selection:
from shinystan.
Ok, I think I found at least part of the problem. I implemented what I hope is the solution on a new github branch. Can you trying installing from that branch by running:
devtools::install_github("stan-dev/shinystan", ref = "feature/autocorr_fix")
Then restart R and give shinyStan a try one more time and see if you still get the errors.
from shinystan.
Great! All fixed in the new version. Thanks for the great work.
(I noticed I no longer get the the masked dplyr functions warning. Was this related to the problem?)
from shinystan.
Ok, great! Yes, it actually did end up being related to dplyr, or more precisely there was a typo (an omission really) in the code for function that produces the autocorrelation plots that would only cause a problem if dplyr is loaded, and still then it would only cause a problem if the packages were loaded in a particular order. It's a bit surprising actually that you're the first person to get this error (or at least the first to report it). So while I'm sorry it wasn't working for you I'm also glad since I wouldn't have noticed it otherwise. I'll be adding this fix to the next official release.
Thanks for your patience and for bringing this bug to my attention!
from shinystan.
I'm going to go ahead and close this issue and add this bug fix to the main branch for the package.
from shinystan.
Related Issues (20)
- use posterior package for handling draws HOT 2
- Check for R version 4.0 HOT 1
- selectizeInput for estimates statistics instead of checkboxGroupInput HOT 1
- Default for "max_treedepth"/"max_td" (11) incorrect? HOT 4
- Add support for CmdStanR objects HOT 3
- diagnostics page doesn't load if `stan_used=FALSE`? HOT 1
- Suppress messages when packages are loaded
- how to raise limit above 1000 parameters? HOT 3
- Shiny stan do not work in ubuntu (tested in ubuntu 20.04 and 16.04 both LTS versions)
- variables missing from drop-down HOT 5
- Problem with LaTeX table: ErrorL subscription out of bounds HOT 6
- Latex for graphs like stan_ac, stan_dens, and others HOT 3
- Rocker script?
- Problem with missing themes HOT 13
- Flickering when selecting parameters on page "ESTIMATE"
- gtools is orphaned - Consider a replacement?
- Issue when launching shinystan demo
- launch_shinystan error message
- toggle view for `exp(param)' ?
- Running ‘testthat.R’/opt/local/Library/Frameworks/R.framework/Resources/bin/BATCH: line 60: 98584 Bus error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinystan.