[R] Combined variable names

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Dec 2 09:59:52 CET 2004

bhx2 at mevik.net (Bjørn-Helge Mevik) writes:

> Peter Dalgaard writes:
> > There are irregularities, e.g. the fact that you do help(foo), not
> > help("foo"), but they tend to get a pain in the long run (How do you
> > get help on a name contained in a variable?
> v <- "lm"; help(v)
> works for me :-)

Eh? When did that sneak in? (1.8.0, I suppose) It's actually not as
working as documented...

   topic: usually, the name on  which documentation is sought. The name
          may be quoted or unquoted (but note that if 'topic' is the
          name of a variable containing a character string
          documentation is provided for the name, not for the character

c <- "lm"; help(c)

works too, for some values of "works"... (I.e. not if you were looking
for help on c()). Also

> help(.Library)
No documentation for '/usr/lib/R/library' in specified packages and
you could try 'help.search("/usr/lib/R/library")'

whereas ?.Library does work. 

And my workaround inside tkStartGUI is now exactly the Wrong Thing to
do. Oh well...

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907

More information about the R-help mailing list