Reputation: 31
How to automatically open an R Shiny app only in the Chrome Web Browser, while Internet Explorer is the default browser?
Example of a run.r file:
require(shiny)
folder_address = 'C:/Temp/Test/'
runApp(folder_address,launch.browser=TRUE)
which is called by a .bat file:
START /MIN "" "R.exe" CMD BATCH "C:\Temp\Test\run.r"
I want to use runApp() and not open it through RStudio.
Upvotes: 1
Views: 2794
Reputation: 31
I added the following line to .Rprofile, which is located in C:\Users\username\Documents:
options(browser="C:/Program Files (x86)/Google/Chrome/Application/chrome.exe")
Notice however that an R Shiny app launched in RStudio still opens in the default browser. In my case IE.
Upvotes: 1