[R] browseURL question
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Feb 28 09:00:54 CET 2004
The problem is the interpretation by the shell used on Unix: on Windows no
shell is used. It seems to me that the Unix version of browseURl should be
quoting `url' in
remoteCmd <- if (isLocal)
switch(basename(browser), "gnome-moz-remote" = , open = url,
galeon = paste("-x", url), kfmclient = paste("openURL",
url), netscape = , mozilla = , opera = , {
paste("-remote \"openURL(", gsub("([,)])", "%\\1",
url), ")\"", sep = "")
})
else url
either by escaping & by \ or surrounding it by single quotes.
I can't see a simple solution for you with the present R codebase.
On Fri, 27 Feb 2004 jtleek at u.washington.edu wrote:
> I have a quick question about the browseURL function. When I use the
> function in a UNIX environment, I have to use two sets of quotations if
> I have the & symbol in the URL. For Windows I only need to use the first
> set. For example, on Windows:
> browseURL("http://search.yahoo.com/search?p=Bioconductor&ei=UTF-8&fr=fp-tab-web-t&n=20&fl=0&x=wrt")
>
> will call up the appropriate website. However, if I use the same command
> under UNIX, the website will be truncated after the first &, but the
> call will work if I use:
> browseURL("'http://search.yahoo.com/search?p=Bioconductor&ei=UTF-8&fr=fp-tab-web-t&n=20&fl=0&x=wrt'")
>
> Where I have added single quotes around the URL.Is there any quick method for solving this problem? Thank you very much for your help.
>
>
> Jeff Leek
> Graduate Student
> University of Washington
> jtleek at u.washington.edu
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list