[R-SIG-Mac] How to correctly set up a browser on Mac?

didier peeters dpeeter1 at ulb.ac.be
Tue Feb 28 12:59:42 CET 2012


Marius,

Try this :  open Safari, then got to Preferences , then General , then first line....

Cheers,

Didier


Le 28 févr. 2012 à 12:44, Marius Hofert a écrit :

> Dear Mac-expeRts,
> 
> I work with R version 2.14.0 (2011-10-31) (Platform:
> x86_64-apple-darwin11.2.0/x86_64 (64-bit)) and recently realized that
> help.start() does not work as expected. I soon found out that
> options(browser="chrome") in my ~/.Rprofile is not valid, "sh" does not find the
> command "chrome". How can I correctly set up Google Chrome as default browser in options()?
> 
> Here is what I tried:
> I know that on a Mac (MacBook Air with 10.7.3 in my case), one can open
> applications via "open -a ...". I tried options(browser="open -a
> /Applications/Google Chrome.app") with various forms of escaping the blank, but
> it did not work. I then used the following trick. I created a file "mybrowser"
> in /bin which contains just this line:
> open -a "/Applications/Google Chrome.app"
> 
> Now I can open Chrome with no error, but help.start() still did not show any
> output. On debugging help.start(), I found out that a simple command such
> browseURL("http://www.google.com") makes Chrome "active", but the url is not
> visited, so my options-setup of "browser" is certainly wrong.
> 
> 
> Cheers,
> 
> Marius
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list