[R] an R function to search on Prof. Baron's site
tmulholland at bigpond.com
Sat Nov 27 02:53:33 CET 2004
The problem appears to be associated with the "|" in
"Rhelp00/archive|Rhelp01/archive|Rhelp02a/archive". When you run the
function in Firefox with restrict set to "doc" it gives the right response.
This function eventually uses system. So I decided to see if I could get
this to work by hand using the code from browseURL
 "\"C:/Program Files/Internet Explorer/iexplore.exe\"
> system(cmd, wait = FALSE)
Works as expected since it does anyway. I make the assumption that I at
least have the code correct.
 "\"C:/Program Files/Mozilla Firefox/firefox.exe\"
> system(cmd, wait = FALSE)
Falls over as previously described
I then thought that maybe quoting the search term would work, but this
appears not to be the case.
As is noted in ?system "The command is run directly as a Windows command
by the Windows API call 'CreateProcess'" Who knows what goes on in these
processes. This is as far as I can go. It looks as if the API connection
between system and Mozilla does not function the same way as with IE,
and it is not obvious to me where the problem might be.
R R version 2.0.1, 2004-11-15
Andy Bunn wrote:
> Using this function with 2.0.0 XP and Firefox 1.0 (I've rediscovered the
> internet) produces a curious result.
>>myString <- RSiteSearch(string = 'Ripley')
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> major 2
> minor 0.0
> year 2004
> month 10
> day 04
> language R
> If no browser is open, then this is the URL that is browsed in Firefox:
> Oddly, these two other windows are opened too:
> This happens regardless of what the search string is. If a browser window is
> open then everything works as planned. The sticky bit, obviously, is parsing
> browseURL which has the same behavior if I try:
> However, the searches:
>>RSiteSearch(string = 'browseURL Firefox')
>>RSiteSearch(string = 'browseURL Mozilla')
> don't turn up much help! If I change browseURL to use IE then browseURL
> behaves as expected:
>>browseURL(myString, browser="C:/Program Files/Internet
> Specifying Firefox explicitly in browseURL doesn't help - It still opens
> three windows as above (if no browser is open):
>>browseURL(myString, browser="C:/Program Files/Mozilla
> So, under Windows the 'NULL' argument in 'browser' which determines the
> browser via file association isn't the problem.
> Anybody know how I can make Firefox work a little more smoothly?
> Thanks, Andy
>>From: r-help-bounces at stat.math.ethz.ch
>>[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Gabor Grothendieck
>>Sent: Tuesday, November 23, 2004 11:56 PM
>>To: r-help at stat.math.ethz.ch
>>Subject: Re: [R] an R function to search on Prof. Baron's site
>>Liaw, Andy <andy_liaw <at> merck.com> writes:
>>: Inspired by the functions that Barry Rawlingson and Dave
>>Forrest posted for
>>: searching Rwiki and R-help archive, I've made up a function
>>that does the
>>: search on Prof. Baron's site (Thanks to Prof. Baron's help on
>>setting up the
>>: query string!):
>>It would be nice if this and the other search functions recently
>>posted were collected into a package or even integrated into
>>R itself. In the case of the Windows Rgui, it would be nice if they
>>appeared on a menu with the other search and help functions.
>>R-help at stat.math.ethz.ch mailing list
>>PLEASE do read the posting guide!
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help