Demo R package. Shows how to call R from C using either
-
.Call
to get to C from R andeval
to call R from C -
.C
to get to C from R andcall_R
to call R from C
Note the latter is deprecated since R-2.15.0 but still works (at least for a while).
Also shows how to call R from Fortran (via C function pretending to be Fortran subroutine).