Shinystan: An error has occurred! in example of as.shinystan

I am trying to run as.shinystan with the example provided in the function documentation.

chain1 <- cbind(beta1 = rnorm(100), beta2 = rnorm(100), sigma = rexp(100))
chain2 <- cbind(beta1 = rnorm(100), beta2 = rnorm(100), sigma = rexp(100))
sso <- shinystan::as.shinystan(list(chain1, chain2))
shinystan::launch_shinystan(sso)

Somehow, this gives an error:
" An error has occurred!

unused argument (href = "http://mc-stan.org/documentation/")"
in the html and also one in the R console:

"Warning: Error in a: unused argument (href = "http://mc-stan.org/documentation/")
  105: dots_list
  104: span
  103: helpText
  102: stan_manual [ui_utils.R#181]
   93: source_ui [ui_utils.R#2]
   80: source_ui [ui_utils.R#2]
Warning: Error in a: unused argument (href = "http://mc-stan.org/documentation/")
  105: dots_list
  104: span
  103: helpText
  102: stan_manual [ui_utils.R#181]
   93: source_ui [ui_utils.R#2]
   80: source_ui [ui_utils.R#2]

I use R 4.1.0 and I thought I could not do many mistakes in this brief lines of code, but somehow I managed to make it not run. Can somebody help me out?

P.S. I did not really know whether this is a interface topic, so I put in the general forum.

1 Like

Hi,
I just ran the code in my R installation and it worked as expected. What is your version of shinystan? I am using 2.5.0. Maybe there is some discrepancy between your version of shinystan and some packages it depends on? Hereā€™s my full sessionInfo() output of packages I have (and where it works) to help you narrow down some possible root causes of the discrepancy.

other attached packages:
[1] shiny_1.6.0

loaded via a namespace (and not attached):
 [1] sass_0.4.0         jsonlite_1.7.2     gtools_3.9.2       bslib_0.2.5.1      RcppParallel_5.1.4 StanHeaders_2.26.3
 [7] threejs_0.3.3      assertthat_0.2.1   stats4_4.1.0       yaml_2.2.1         pillar_1.6.2       lattice_0.20-44   
[13] glue_1.4.2         digest_0.6.27      promises_1.2.0.1   colorspace_2.0-2   htmltools_0.5.1.1  httpuv_1.6.1      
[19] plyr_1.8.6         dygraphs_1.1.1.6   pkgconfig_2.0.3    rstan_2.26.3       purrr_0.3.4        xtable_1.8-4      
[25] scales_1.1.1       processx_3.5.2     later_1.2.0        tibble_3.1.3       bayesplot_1.8.1    generics_0.1.0    
[31] ggplot2_3.3.5      ellipsis_0.3.2     DT_0.18            cachem_1.0.5       withr_2.4.2        shinyjs_2.0.0     
[37] cli_3.0.1          magrittr_2.0.1     crayon_1.4.1       mime_0.11          ps_1.6.0           fansi_0.5.0       
[43] xts_0.12.1         pkgbuild_1.2.0     colourpicker_1.1.0 rsconnect_0.8.24   tools_4.1.0        loo_2.4.1         
[49] prettyunits_1.1.1  lifecycle_1.0.0    matrixStats_0.60.0 stringr_1.4.0      V8_3.4.2           munsell_0.5.0     
[55] callr_3.7.0        jquerylib_0.1.4    compiler_4.1.0     rlang_0.4.11       grid_4.1.0         ggridges_0.5.3    
[61] htmlwidgets_1.5.3  crosstalk_1.1.1    igraph_1.2.6       miniUI_0.1.1.1     base64enc_0.1-3    gtable_0.3.0      
[67] codetools_0.2-18   inline_0.3.19      DBI_1.1.1          curl_4.3.2         markdown_1.1       reshape2_1.4.4    
[73] R6_2.5.0           gridExtra_2.3      zoo_1.8-9          dplyr_1.0.7        fastmap_1.1.0      utf8_1.2.2        
[79] shinystan_2.5.0    shinythemes_1.2.0  stringi_1.7.3      parallel_4.1.0     Rcpp_1.0.7         vctrs_0.3.8       
[85] xfun_0.25          tidyselect_1.1.1  

Hope you can get this resolved soon!