[Rd] How to access to internal header files

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Tue May 24 15:23:36 CEST 2022

>>>>> Sebastian Fischer 
>>>>>     on Tue, 24 May 2022 09:01:17 +0200 writes:

    > Dear R-devel Mailing List,

    > I would like to get a better understanding of R's internal structures by 
    > using R's
    > C API. For that I would like to have access to all the C header files 
    > that are listed
    > here: https://github.com/wch/r-source/tree/trunk/src/include. (i.e. I 
    > want to e.g.
    > #include <Defn.h>

    > However when I install R, there is only a subset of those header files 
    > available on my system. 

Of course, very much on purpose.
Headers such as Defn.h are *not* part of the API and hence
should not be visible.

    > While I am aware that files like Defn.h are not intended  to be used by
    > R Extensions, I assume there must be some way to configure R's 
    > compilation to make
    > these definitions available for my exploration of the language.

Well, if you want to explore how R is written ... and that's the
only good reason for looking into such private header files ...
then get the sources of R and explore...

The official sources (and even daily snapshots from both
"R-patched" and "R-devel")  are available e.g. from


    > I would appreciate any help.

    > Best regards

    > Sebastian Fischer

    > ______________________________________________
    > R-devel using r-project.org mailing list
    > https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list