I just tried out shinystan and it works really well. I will have to explore more what I will be able to do with that. One thing I realised afterwards though is that it reset my browser settings, using Mozilla Firefox. My addons are still there, but things like booksmark-toolbar, download folder, startpage etc were reset.
I tried a couple of times now. It saves my previous opened pages (for example this one with text saved, as I wante to directly try it again), but settings are gone.
I am launching shinystan in R via
where fit is the result of a stan function call in rstan. (fit <- stan(…))
Is there a way to
a) make this call not reset my settings in FF
b) tell this call to use another browser (which would not be the default one)
c) use another interface altogether (although I would rather not install RStudio)
d) (and this is more firefox specific I guess) make it so that I am able to have different “profiles” of settings, which I could at least use after using shinystan to restore everything
Just trying to pump out ideas.
Hmm that’s no good! I have no idea why that’s happening. I’ve never seen shinystan affect browser settings in that way, but I also don’t use Firefox regularly so I’m not sure. I use Safari and Chrome regularly and I’ve never experienced anything like that. I’ll try to reproduce this behavior with Firefox and figure out what’s going on.
In terms of using a non-default browser,
launch_shinystan is calling
shiny::runApp which in turn calls
browseURL looks for the value of
getOption("browser") to see where to open the URL so in theory you should be able to set
options(browser = X) before calling
X is the appropriate thing to specify. But I’m not exactly sure what the right way to specify
X is. Check out the doc for the
browser argument to
utils::browseURL and maybe you can figure out what you need to specify in your case (looks like it depends on your operating system, what browser you want to use, etc.).
Okay, I’ll go check die browser option.
Maybe another thing to pinpoint the problem:
When I open shinystan everything is still normal, it’s when I close shinystan and then open the browser again, that the settings are reset. Additionally, I am not able to launch shinystan when a window of FF is still open, I have to close everything.
After having fiddled with it a bit, two things.
A) For anyone having similar problems: I Ubuntu (16.04) the correct option in R is to specify (e.g.)
options(browser = "/usr/bin/google-chrome")
B) I believe this problem may be caused by using R as a super user (with sudo R).
(When I tried chrome, it gave me an error saying that if I want to use chrome as root I should rerun it differently.)
After running R as a normal user now, several things changed.
A) I do not need to close firefox before being able to launch shinystan, it now simply opens in a new tab.
B) It does not reset my settings anymore.
This means my problem is solved, thank you @jonah for providing a spark which lead me to investigate further and finally being able to diagnose the problem!
Nonetheless, I guess it is strange that using R as root caused the problems. If you should have any more questions regarding this, go ahead.
I’m glad it’s ok for you now and thanks a lot for following up with all of
those details! That’s really helpful.
When I have a chance I’ll try to identify if this root vs normal user
problem is a shinystan issue or a shiny issue or an R issue, etc.