5

I have read the description but i am still confuse by the role of the .Internal function. Because it works fine with .Internal(body(mean))but not with .Internal(mean). I presume that this is written in c++ and is compiled, but it is possible to see the code? In what folder of the R folder is?

Thanks in advance

donpresente
  • 1,230
  • 2
  • 13
  • 24

1 Answers1

7

You can view the c source code with this:

pryr::show_c_source(.Internal(mean()))

From @Dominic Comtois post here, "the show_c_source function will search on GitHub for the relevant piece of code in the C source files. Works for .Internal and .Primitive functions."

Community
  • 1
  • 1
Adam Birenbaum
  • 940
  • 9
  • 23