26
votes

Normally the shiny app opens through the inbuilt browser within R-Studio. Is it possible to open the app directly in the web browser, say Google Chrome, without going through the R-Studio.

2
You mean something like this: runApp(list(ui = ui, server = server),host="192.168.xxx.xx",port=80, launch.browser = T). as long as the app running you can access it by typing into your browser the IP address of the app (192.168.xxx.xx:80) - Pork Chop
@PorkChop Thankyou...what I meant was, when you click on the run app button in R-Studio, can the app be made to open in the default web browser. - Apricot

2 Answers

26
votes

To run it using different approach to @Batanichek you can locate the executables of each of your browsers and then specify it in options which to point to, as so:

Edit: You can find the options and its arguments in the R environment (I used RStudio) e.g. options(browser = )

Step 1: Locate where your .exe files are installed for all you browsers, then add the following:

For Chrome

options(browser = "C:/Program Files/Google/Chrome/Application/chrome.exe")

For Firefox

options(browser = "C:/Program Files/Mozilla Firefox/firefox.exe")

For IE

options(browser = "C:/Program Files/Internet Explorer/iexplore.exe")

Step 2: Run the app as always

runApp(list(ui = ui, server = server),host="192.168.xx.xx",port=5013, launch.browser = TRUE)
46
votes

In my Rstudio(Version 0.98.1103) i can change where run app

enter image description here

If your choose Run External its run into browser