I am rarely using IE for web browsing, so would like R help opens in it when calling help functions. Currently it opens my default web browser (Chrome). I would like to leave system-wide default browser intact, but change browser only for R.
Is it possible?
I found some texts about how to edit Rprofile.site
, but failed to deduce how to set for IE and Windows.
The default browser is set by option "browser" , in turn set by the environment variable R_BROWSER which is by default set in file R_HOME /etc/Renviron to a choice made manually or automatically when R was configured.
Select the Start button, and then type Default apps. In the search results, select Default apps. Under Web browser, select the browser currently listed, and then select Microsoft Edge or another browser.
Select Start > Search , and enter Windows features. Select Turn Windows features on or off from the results and make sure the box next to Internet Explorer 11 is selected. Select OK, and restart your device.
A solution could be to create a file named .Rprofile
in your home directory and put the following line:
options(browser="path/to/IE")
Of course, you have to replace the path/to/IE
part to the actual path to the IE executable (could be something like C:\\Program Files\\Internet Explorer\\iexplore.exe\
).
Restart R and try for instance browseURL("www.google.com")
to see if it has taken effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With