Search code examples
rshiny

Opening Shiny App directly in the default browser


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.


Solution

  • 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)