Opening Shiny App directly in the default browser

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)

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


Adding to other replies here, I feel it's worth mentioning that one does not necessarily need to give the full path to the external web browser, if you're happy with the default external browser, and you're using Rstudio (i.e. basically, if your goal is not to open Rstudio's own internal browser).

For Rstudio users, the following will do:

options(shiny.launch.browser = .rs.invokeShinyWindowExternal)

You can run it at the beginning of each session when you need this, or by including this line in your ~/.Rprofile if you like this to be default behaviour, which can be conveniently done with usethis::edit_r_profile().

For more details and alternative settings, see this post.

Tags:

R

Rstudio

Shiny