19

Based on this answer, I learned of a special class of internal functions that can be accessed from R: a set of functions accessed via .Internal(specialFunction). If one queries ?.Internal this excerpt may be found:

Only true R wizards should even consider using this function, and only R developers can add to the list of internal functions.

I want to master potions and defense against the Dark Arts for my OWLs interesting R functions. Where can R wizards find a list and description of the internal functions? So long as it doesn't involve splitting my soul.

Community
  • 1
  • 1
Iterator
  • 20,250
  • 12
  • 75
  • 111

1 Answers1

16

They're in src/main/names.c but they are not alone. The .Primitive are there too. And some dragons.

They are documented in Section 2) .Internal vs .Primitive in the R Internals manual.

Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
  • Maybe I'm missing something - where's the documentation? Double, double toil and tRouble... – Iterator Sep 07 '11 at 00:21
  • 1
    @Iterator: sorry, I got focused on the "list" and missed the "description" in your question. – Joshua Ulrich Sep 07 '11 at 00:31
  • 1
    +1 Thanks for the info. However, there's something quite odd. I looked in the R Internals (seems like a good place to find .Internal :)), but I gave up because I didn't find `inspect`, from your answer. In other words, there's another secret guide that includes `inspect`, or else this is undocumented. The plot thickens. I have turned up [this](http://stackoverflow.com/questions/1295955/what-is-the-most-useful-r-trick/3396245#3396245) note left by...you. :) – Iterator Sep 07 '11 at 01:06
  • 3
    @Iterator: _R Internals_ doesn't discuss `inspect`. The section I linked to only discusses `.Internal` and `.Primitive`. I added a link to `names.c`, which lists all the `.Internal` and `.Primitive` functions. I learned about `inspect` when it was mentioned on the R-devel mailing list. When it comes to the internal R code, "the code *is* the documentation". ;-) – Joshua Ulrich Sep 07 '11 at 01:16
  • Fine, I'll take your word for it, but that's splitting my soul. Again. :) (I searched the web, SO, John Chambers' recent book, Amazon, Google books... if this is documented somewhere, someone's made that documentation invisible. Darn "true" wizards.) – Iterator Sep 07 '11 at 01:48