[R-SIG-Mac] Permanently fix R to open Help page in html

Marc Schwartz marc_schwartz at me.com
Tue Jul 11 18:42:53 CEST 2017


Hi Christofer,

Here is the content of my fairly simple .Rprofile:

options(help_type = "html")
local({r <- getOption("repos")
       r["CRAN"] <- "http://cran.us.r-project.org"
       options(repos=r)
})
options(papersize = "letter")
options(show.signif.stars = FALSE)
options(device = "quartz")
options(width = 72)


Note that I do not have a .First function defined and HTML based help works just fine for me in a Terminal session.

The setting of my CRAN repo is based upon the examples in ?Startup.

Another thought, which may be a long shot. Check to see if there is a .RData file in your home directory and if so, move it to the Desktop or some other location and try a new R session without it being present. Alternatively start a new R session from the Terminal using:

  R --no-restore-data

It may be possible that there is some level of corruption in the .RData file or something was saved in the image file from a prior session that is causing a conflict.

Regards,

Marc

> On Jul 11, 2017, at 10:55 AM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote:
> 
> Hi Marc,
> 
> When I enter 'open -a Textedit ~/.Rprofile' in Terminal .RProfie file
> opens. Below is the content of that file :
> 
> .First <- function() {
>    options("repos" = c(CRAN = "http://cran.r-project.org/"))
>    options(help_type = "html")
> }
> 
> An the R window looks like below :
> 
> R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
> 
> Copyright (C) 2017 The R Foundation for Statistical Computing
> 
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
> 
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> 
> You are welcome to redistribute it under certain conditions.
> 
> Type 'license()' or 'licence()' for distribution details.
> 
> 
>  Natural language support but running in an English locale
> 
> 
> R is a collaborative project with many contributors.
> 
> Type 'contributors()' for more information and
> 
> 'citation()' on how to cite R or R packages in publications.
> 
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 
> 'help.start()' for an HTML browser interface to help.
> 
> Type 'q()' to quit R.
> 
> 
> [Previously saved workspace restored]
> 
> 
>> ?sum
> 
> starting httpd help server ... done
> 
>> 
> 
> 
> Please let me know if you need anything else.
> 
> Thanks,
> 
> On Tue, Jul 11, 2017 at 8:29 PM, Marc Schwartz <marc_schwartz at me.com> wrote:
>> Christofer,
>> 
>> The thing is that you really don't need to do that (use .First), which makes this situation curious and why it would be helpful to see the full content of your .Rprofile file, to be sure that there is not a conflict in content or structure someplace.
>> 
>> An extra set of eyes might be helpful.
>> 
>> Marc
>> 
>>> On Jul 11, 2017, at 9:52 AM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I just put options(help_type = "html") inside .First <- function() {}
>>> and now it works. Help page is now opening in Browser.
>>> 
>>> Thanks all for your time and help. Regards,
>>> 
>>> 



More information about the R-SIG-Mac mailing list