# Launch\_shinystan error

**URL:** <https://discourse.mc-stan.org/t/launch-shinystan-error/28232>\
**Category:** rstanarm\
**Tags:** techniques\
**Created:** [July 18, 2022, 7:55am UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232 "2022-07-18T07:55:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangguoqianggu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/zhangguoqianggu/32/14642_2.png) [@zhangguoqianggu](https://discourse.mc-stan.org/u/zhangguoqianggu)\
**Post date:** [July 18, 2022, 7:55am UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232/1 "2022-07-18T07:55:46Z")

</div>

When I tried to use launch\_shinystan to reproduce a plot (Figure 4) from shinystan in the paper [User-friendly Bayesian regression modeling: A tutorial with rstanarm and shinystan](https://www.tqmp.org/RegularArticles/vol14-2/p099/p099.pdf?ref=https://githubhelp.com), an error message appeared:

“project “ggplot\_fns.rda” has no activate script and so cannot be activated”

The code I used was:

```nohighlight
SingleLevelModel <- stan_glm(valence ~ arousal, data = dat)
launch_shinystan(SingleLevelModel)

```

Dataset: [OSF](https://osf.io/5cg32?view_only=3fe201fd40d34fbfaf4a3e801c40df5e)

- rstanarm Version: 2.21.1

I have searched Google and the Stan Forum, and I haven’t seen this error been reported. So, I am reporting it here. I apologise if this is not the right place to discuss this issue, since this is about shinystan, not directly stan or rstanarm. Hope to get some help. Many thanks in advance!

---

<div class="post-metadata">

**Author:** ![dontchaknowjo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/dontchaknowjo/32/14694_2.png) [@dontchaknowjo](https://discourse.mc-stan.org/u/dontchaknowjo)\
**Post date:** [July 19, 2022, 7:19pm UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232/2 "2022-07-19T19:19:50Z")

</div>

I’m getting the same error for one of my models

---

<div class="post-metadata">

**Author:** ![zhangguoqianggu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/zhangguoqianggu/32/14642_2.png) [@zhangguoqianggu](https://discourse.mc-stan.org/u/zhangguoqianggu)\
**Post date:** [July 20, 2022, 4:40am UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232/3 "2022-07-20T04:40:56Z")

</div>

Hope someone could help out here.  
I am really excited to use shinystan in my PhD project, but it does not work so far, quite frustrating :( I found it works for linear regression model, but not conditional logistic regression model.

---

<div class="post-metadata">

**Author:** ![andrjohns](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andrjohns/32/15297_2.png) [@andrjohns](https://discourse.mc-stan.org/u/andrjohns)\
**Post date:** [July 20, 2022, 6:51am UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232/5 "2022-07-20T06:51:34Z")

</div>

> [@zhangguoqianggu](#):
>
> project “ggplot\_fns.rda” has no activate script and so cannot be activated

The `ggplot_fns.rda` file is part of the `shinystan` package, so I wonder if the installation might have been corrupted or similar.

Can I get you to restart R and try re-installing `shinystan` from source and launching the demo?

```r
remove.packages("shinystan")
install.packages("shinystan", type = "source")
shinystan::launch_shinystan_demo()

```

If that still errors for you, can you post the output from:

```r
devtools::session_info("shinystan")

```

---

<div class="post-metadata">

**Author:** ![dontchaknowjo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/dontchaknowjo/32/14694_2.png) [@dontchaknowjo](https://discourse.mc-stan.org/u/dontchaknowjo)\
**Post date:** [July 20, 2022, 3:32pm UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232/6 "2022-07-20T15:32:36Z")

</div>

I tried reinstalling and got the same error when I tried to launch the demo. FWIW I have an M1 processor which seems to cause all sorts of problems.

─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  
setting value  
version R version 4.1.2 (2021-11-01)  
os macOS Monterey 12.4  
system aarch64, darwin20  
ui RStudio  
language (EN)  
collate en\_US.UTF-8  
ctype en\_US.UTF-8  
tz America/New\_York  
date 2022-07-20  
rstudio 2021.09.0+351 Ghost Orchid (desktop)  
pandoc 2.14.0.3 @ /Applications/RStudio.app/Contents/MacOS/pandoc/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  
package \* version date (UTC) lib source  
abind 1.4-5 2016-07-21 [1] CRAN (R 4.1.0)  
backports 1.4.1 2021-12-13 [1] CRAN (R 4.1.1)  
base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.1.0)  
bayesplot \* 1.9.0 2022-03-10 [1] CRAN (R 4.1.1)  
BH 1.78.0-0 2021-12-15 [1] CRAN (R 4.1.1)  
bslib 0.4.0 2022-07-16 [1] CRAN (R 4.1.2)  
cachem 1.0.6 2021-08-19 [1] CRAN (R 4.1.1)  
callr 3.7.1 2022-07-13 [1] CRAN (R 4.1.2)  
checkmate 2.1.0 2022-04-21 [1] CRAN (R 4.1.2)  
cli 3.3.0 2022-04-25 [1] CRAN (R 4.1.2)  
colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.1.1)  
colourpicker 1.1.1 2021-10-04 [1] CRAN (R 4.1.1)  
commonmark 1.8.0 2022-03-09 [1] CRAN (R 4.1.1)  
crayon 1.5.1 2022-03-26 [1] CRAN (R 4.1.1)  
crosstalk 1.2.0 2021-11-04 [1] CRAN (R 4.1.1)  
desc 1.4.1 2022-03-06 [1] CRAN (R 4.1.1)  
digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.1)  
distributional 0.3.0 2022-01-05 [1] CRAN (R 4.1.1)  
dplyr \* 1.0.9 2022-04-28 [1] CRAN (R 4.1.1)  
DT 0.23 2022-05-10 [1] CRAN (R 4.1.1)  
dygraphs 1.1.1.6 2018-07-11 [1] CRAN (R 4.1.0)  
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.0)  
fansi 1.0.3 2022-03-24 [1] CRAN (R 4.1.1)  
farver 2.1.1 2022-07-06 [1] CRAN (R 4.1.2)  
fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.0)  
fontawesome 0.2.2 2021-07-02 [1] CRAN (R 4.1.0)  
fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.1)  
generics 0.1.3 2022-07-05 [1] CRAN (R 4.1.1)  
ggplot2 \* 3.3.6 2022-05-03 [1] CRAN (R 4.1.1)  
ggridges 0.5.3 2021-01-08 [1] CRAN (R 4.1.1)  
glue 1.6.2 2022-02-24 [1] CRAN (R 4.1.1)  
gridExtra 2.3 2017-09-09 [1] CRAN (R 4.1.1)  
gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.1)  
gtools 3.9.3 2022-07-11 [1] CRAN (R 4.1.2)  
htmltools 0.5.3 2022-07-18 [1] CRAN (R 4.1.2)  
htmlwidgets 1.5.4 2021-09-08 [1] CRAN (R 4.1.1)  
httpuv 1.6.5 2022-01-05 [1] CRAN (R 4.1.1)  
igraph 1.3.2 2022-06-13 [1] CRAN (R 4.1.1)  
inline 0.3.19 2021-05-31 [1] CRAN (R 4.1.0)  
isoband 0.2.5 2021-07-13 [1] CRAN (R 4.1.0)  
jquerylib 0.1.4 2021-04-26 [1] CRAN (R 4.1.0)  
jsonlite 1.8.0 2022-02-22 [1] CRAN (R 4.1.1)  
labeling 0.4.2 2020-10-20 [1] CRAN (R 4.1.0)  
later 1.3.0 2021-08-18 [1] CRAN (R 4.1.1)  
lattice \* 0.20-45 2021-09-22 [1] CRAN (R 4.1.2)  
lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.1.0)  
lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.1)  
loo 2.5.1 2022-03-24 [1] CRAN (R 4.1.1)  
magrittr \* 2.0.3 2022-03-30 [1] CRAN (R 4.1.1)  
markdown 1.1 2019-08-07 [1] CRAN (R 4.1.0)  
MASS \* 7.3-58 2022-07-14 [1] CRAN (R 4.1.2)  
Matrix \* 1.4-1 2022-03-23 [1] CRAN (R 4.1.1)  
matrixStats 0.62.0 2022-04-19 [1] CRAN (R 4.1.1)  
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.1.1)  
mgcv 1.8-40 2022-03-29 [1] CRAN (R 4.1.1)  
mime 0.12 2021-09-28 [1] CRAN (R 4.1.1)  
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.1.0)  
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.0)  
nlme 3.1-158 2022-06-15 [1] CRAN (R 4.1.1)  
numDeriv 2016.8-1.1 2019-06-06 [1] CRAN (R 4.1.0)  
pillar 1.8.0 2022-07-18 [1] CRAN (R 4.1.2)  
pkgbuild 1.3.1 2021-12-20 [1] CRAN (R 4.1.1)  
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.0)  
plyr 1.8.7 2022-03-24 [1] CRAN (R 4.1.1)  
posterior 1.2.2 2022-06-09 [1] CRAN (R 4.1.1)  
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.0)  
processx 3.7.0 2022-07-07 [1] CRAN (R 4.1.2)  
promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.1.0)  
ps 1.7.1 2022-06-18 [1] CRAN (R 4.1.1)  
purrr \* 0.3.4 2020-04-17 [1] CRAN (R 4.1.0)  
R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.1)  
rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.1.0)  
RColorBrewer \* 1.1-3 2022-04-03 [1] CRAN (R 4.1.1)  
Rcpp \* 1.0.9 2022-07-08 [1] CRAN (R 4.1.2)  
RcppEigen 0.3.3.9.2 2022-04-08 [1] CRAN (R 4.1.1)  
RcppParallel 5.1.5 2022-01-05 [1] CRAN (R 4.1.1)  
reshape2 \* 1.4.4 2020-04-09 [1] CRAN (R 4.1.0)  
rlang 1.0.4 2022-07-12 [1] CRAN (R 4.1.2)  
rprojroot 2.0.3 2022-04-02 [1] CRAN (R 4.1.1)  
rstan 2.21.5 2022-04-11 [1] CRAN (R 4.1.1)  
sass 0.4.2 2022-07-16 [1] CRAN (R 4.1.2)  
scales 1.2.0 2022-04-13 [1] CRAN (R 4.1.1)  
shiny \* 1.7.2 2022-07-19 [1] CRAN (R 4.1.2)  
shinyjs 2.1.0 2021-12-23 [1] CRAN (R 4.1.1)  
shinystan \* 2.6.0 2022-03-03 [1] CRAN (R 4.1.2)  
shinythemes 1.2.0 2021-01-25 [1] CRAN (R 4.1.0)  
sourcetools 0.1.7 2018-04-25 [1] CRAN (R 4.1.0)  
StanHeaders 2.21.0-7 2020-12-17 [1] CRAN (R 4.1.0)  
stringi 1.7.8 2022-07-11 [1] CRAN (R 4.1.2)  
stringr \* 1.4.0 2019-02-10 [1] CRAN (R 4.1.1)  
tensorA 0.36.2 2020-11-19 [1] CRAN (R 4.1.0)  
threejs 0.3.3 2020-01-21 [1] CRAN (R 4.1.0)  
tibble \* 3.1.7 2022-05-03 [1] CRAN (R 4.1.1)  
tidyselect 1.1.2 2022-02-21 [1] CRAN (R 4.1.1)  
utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.0)  
vctrs 0.4.1 2022-04-13 [1] CRAN (R 4.1.1)  
viridisLite 0.4.0 2021-04-13 [1] CRAN (R 4.1.0)  
withr 2.5.0 2022-03-03 [1] CRAN (R 4.1.1)  
xfun 0.31 2022-05-10 [1] CRAN (R 4.1.1)  
xtable \* 1.8-4 2019-04-21 [1] CRAN (R 4.1.0)  
xts 0.12.1 2020-09-09 [1] CRAN (R 4.1.0)  
yaml 2.3.5 2022-02-21 [1] CRAN (R 4.1.1)  
zoo 1.8-10 2022-04-15 [1] CRAN (R 4.1.1)

[1] /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library

---

<div class="post-metadata">

**Author:** ![zhangguoqianggu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/zhangguoqianggu/32/14642_2.png) [@zhangguoqianggu](https://discourse.mc-stan.org/u/zhangguoqianggu)\
**Post date:** [July 21, 2022, 3:24pm UTC](https://discourse.mc-stan.org/t/launch-shinystan-error/28232/7 "2022-07-21T15:24:33Z")

</div>

Thanks a lot! Now it works!
