R-alpha: builtins(): Nice (but undocumented) function in R-alpha (( bug ??))

Martin Maechler (maechler@stat.math.ethz.ch)
Thu, 21 Mar 96 18:40:35 +0100

Date: Thu, 21 Mar 96 18:40:35 +0100
Message-Id: <9603211740.AA18231@>
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: R-testers@stat.math.ethz.ch
Subject: R-alpha: builtins(): Nice (but undocumented) function in R-alpha  (( bug ??))

builtins() is really very  useful if you "explore" the system
I found it by "accident" only;
it has no  HELP page, nor is it mentioned as an  'SEE ALSO' in  help(ls)

[ --> side issue: how much are you -- Ross & Robert -- interested in
                  patches to the function help pages ?

      Quite a few of them have no examples some of which I have fun to add,
      others lack relevant 'see also's, 
      other have small typos, etc.

      However, I only feel like improving these pages when you are willing 
      to more or less incorporate them into the distribution.

###----- Try the following code:
## alpha-0.2 :

length(builtins()) # 534 ;  wow, finally a way to get at these names...
bi.i <- builtins(internal = T)
length(bi.i) # 97
##-- BUG (at least incompatible with S,  AND with what I expect):
length( a <- 1: 10) # does NOT print anything

match(bi.i, builtins())
##-  [1]  40  49  55  69  NA  NA  76  78  81  87 .....
##                        ^^  ^^
## so, seemingly not all internal builtins belong to the builtins.
## which do not ?
bi.i[ is.na(match(bi.i, builtins())) ]
##>> [1] "as.ordered" "as.unordered" "device" "psort" "remove"
##> Error: Object "as.ordered" not found
##> 		--- and the same for the other four ones ...


BTW: Upon request of Ross,
    I've put up a 'majordomo-automated' mailing list for us R-testers 
    here, and the old address will continue to work ((for some time (?))).
    The last 4 lines of what you will get are automagically added by majordomo.

Martin Maechler <maechler@stat.math.ethz.ch>		 <><
Seminar fuer Statistik, SOL F5
ETH (Federal Inst. Technology)	8092 Zurich	 SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1086
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch