[R] problem when calling help.search() a second time

Jean lobry
2006-06-01T09:02:28Z

Dear list,

I would like to make a Sweave document that, for a given package,
automatically inserts the graphical outputs obtained when runing
the example code of high level plot functions. That is, for the
"graphics" base package, something like this:
http://pbil.univ-lyon1.fr/R/fichestd/tdr79.pdf

For this, I need the list of high level plot functions of a
given package. I have encountered a problem when calling twice the
help.search() function which is illustrated bellow:

[rufus:~] lobry% R --vanilla --quiet
>  sessionInfo()
Version 2.3.0 (2006-04-24)
powerpc-apple-darwin8.6.0

attached base packages:
[1] "methods"   "stats"     "graphics"
"grDevices" "utils"     "datasets"
[7] "base"
>  help.search(package = "graphics", keyword = "hplot")

#this one is OK, but not the next one:

>  help.search(package = "stats", keyword = "hplot")
Erreur dans help.search(package = "stats", keyword =
"hplot") :
         could not find package 'stats'
>  q()

#Now, if I switch the call order:

[rufus:~] lobry% R --vanilla --quiet
>  help.search(package = "stats", keyword = "hplot")

#this one is OK, but not the next one:

>  help.search(package = "graphics", keyword = "hplot")
Erreur dans help.search(package = "graphics", keyword =
"hplot") :
         could not find package 'graphics'
>  q()
[rufus:~] lobry%


Is there something obvious I'm missing?

Thanks for any hint,

Jean.
--
Jean R. Lobry            (lobry at biomserv.univ-lyon1.fr)
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - LYON I,
43 Bd 11/11/1918, F-69622 VILLEURBANNE CEDEX, FRANCE
allo  : +33 472 43 12 87     fax    : +33 472 43 13 88