[R-SIG-Mac] Blank help window
Marc Schwartz
m@rc_@chw@rtz @ending from me@com
Fri Oct 19 01:08:12 CEST 2018
Ok, I think that Peter and Duncan are on to the key issue here.
I have been trying to figure out what the difference is between displaying HTML help in R.app versus in the terminal and we now know.
If running R in R.app, where .Platform$GUI == "AQUA", the key line in the HTML browser display process is:
x <- gsub("http://127.0.0.1 <http://127.0.0.1/>", "http://localhost <http://localhost/>", x, fixed = TRUE)
where the IP address in the help file URL ('x') is changed to localhost. That does not happen when running R from the terminal and the IP address is used.
In other words, a url something like:
"http://127.0.0.1:27572/library/graphics/html/plot.html"
gets regex'd to:
"http://localhost:27572/library/graphics/html/plot.html"
Typically there is an entry in /etc/hosts that maps 127.0.0.1 to localhost. If that entry is not present, then the OS does not know how to map the domain 'localhost' to a physical IP address, much like a DNS server could not map an internet domain name to a physical server IP address.
Ben, if you are not sure about how to look at /etc/hosts per Peter's message below, you can use:
cat /etc/hosts | grep localhost
in a terminal and see what it returns.
Marc
> On Oct 18, 2018, at 6:29 PM, peter dalgaard <pdalgd using gmail.com> wrote:
>
> Cannot _find_ localhost?? Can you do this (in a Terminal window) ?
>
> Peter-Dalgaards-MacBook-Air:STAT pd$ ping localhost
> PING localhost (127.0.0.1): 56 data bytes
> Request timeout for icmp_seq 0
> Request timeout for icmp_seq 1
> ^C
> --- localhost ping statistics ---
> 3 packets transmitted, 0 packets received, 100.0% packet loss
>
> If not, what is in the first couple of lines in /etc/hosts?
>
> -pd
>
>> On 19 Oct 2018, at 00:09 , Ben Tupper <btupper using bigelow.org> wrote:
>>
>> Just a little followup. Switching the default browser from Firefox to Safari yields a similar message in the browser after...
>>
>> Browse[2]> browseURL(x)
>>
>> 'Safari can't open the page "localhost:29682/library/utils/html/help.html"
>> because Safari can't find the server "localhost".'
>>
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd.mes using cbs.dk Priv: PDalgd using gmail.com
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[[alternative HTML version deleted]]
More information about the R-SIG-Mac
mailing list