[R] Firefox keyword searches for R & S-Plus

kwright@eskimo.com kwright at eskimo.com
Sat Nov 13 03:13:02 CET 2004

Nice idea.  A couple of comments.

1. I personally always install R in c:/R/ instead of c:/Program Files/
There are frequently comments on R-help that it is better to avoid paths
with spaces.  Still, you should be able to use /Progra~1/ instead of
/Program Files/

2. The search engine plugin that you have created generates a URL like this:

What is needed is a URL like
where the %s is the string from the text box.

I speculate it might be possible to change the SearchObject.html file to
grab the "q=nlme" and strip off the "q=" but I have no idea if this is

I'm not comfortable with HTML/Java/Javascript to get this working properly.

3. My comment about editing the SearchObject.html file to change the
"false" to "true" doesn't seem to cause the search to match the results
obtained using the traditional way of opening the search page and typing
in the text.
I'm not sure why.  Would love it if someone figured this out.

Seems like all of this would be fairly easy for a good web programmer.


> Hello Kevin,
> That's a good idea to use the functionnality of firefox to search for
> help in R.
> I wonder if that is possible to perform the search in the searchplugins
> (like google), I tried to but there is always the characters %20= that
> messed up with the one I was actually looking at.
> Maybe something I don't see well, I created the following file in my
> C:/Program Files/Mozilla Firefox/searchplugins directory (just copying
> the google one)
> _____________________________________________________________________________________________
> # Mozilla/R plug-in by francoisromain at free.fr
> <search
>    name="R"
>    description="R search engine"
>    method="GET"
>    action="file:///C:/Program%20Files/R/rw2000/doc/html/search/SearchObject.html"
> <input name=" " user>
> <interpret
>     browserResultType="result"
>     charset = "UTF-8"
>     resultListStart="<!--a-->"
>     resultListEnd="<!--z-->"
>     resultItemStart="<!--m-->"
>     resultItemEnd="<!--n-->"
> </search>
> _______________________________________________________________________________________________
> Any idea ?
> Sorry for my english.
> Romain.
> kwright at eskimo.com a écrit :
>>If you've 'rediscovered the web' with Firefox (http://getfirefox.com),
>> you
>>might find this tip handy.  Suppose you want to search the (local) R
>>documentation for information about the lme function.  Wouldn't it be
>> nice
>>to just type into the browser address bar:
>>  r lme
>>and have the search performed?  Here's how (on Windows):
>>Click on this link:
>>Bookmark the page and name the bookmark something like: R 2.0.0 doc
>> search
>>Edit the properties of the bookmark (by right-clicking on the bookmark)
>>and in the keywords field enter: r
>>Click OK.
>>That's all there is to it except for a couple of notes:
>>1. The first time the local search is performed (during a browser
>>session), the java search applet has to be loaded.  This takes several
>>2. If you use a different operating system, a different version of R, or
>>install R in a different location, change the bookmark path to the
>>"SearchObject" file as appropriate.
>>3. By default this only searches Help page titles.  You may prefer a more
>>comprehensive search that includes Keywords and Object names.  Edit the
>>SearchObject.html file and change 'false' to 'true' in the following
>> line:
>>  line = line + document.SearchEngine.search
>> (searchstring,true,true,true);
>>Here are my R and S-Plus bookmarks.  I'll just give the link, my bookmark
>>name, and my bookmark keyword.
>>R mail archive search
>>S-news archive search
>>R 2.0.0 doc search
>>Happy searching!
>>Kevin Wright
>>R-help at stat.math.ethz.ch mailing list
>>PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
> --
> Romain François
> 25, avenue Guy Moquet
> 94 400 Vitry sur seine
> _______________________
> _______________________
> francoisromain at free.fr
> 01 46 80 65 60
> 06 18 39 14 69

More information about the R-help mailing list