| getRoutineRefs {Slcc} | R Documentation |
This function returns the `names' of the native routines that are called in a collection of R functions and code.
file |
the name of one or more files containing the R source code.
If a single file name is given and this identifies a directory,
the files within this directory matching the pattern *.[RSsrq]$ (passed to dir)
are processed. |
package |
the name of a package whose code is to be used to find the calls to the native routines. This is an alternative to specifying the single file containing the source code. |
lib.loc |
location(s) of the libraries.
This is used in system.file
to find the code in the package specified via
the package argument. |
fun |
a function that is applied to the expressions of each file that is parsed. The default value defines a closure which accumulates across the different source files the names of the routines that are invoked in the S code. |
verbose |
a logical value which, if TRUE, causes the
name of each source file to be printed before it is parsed. |
This iterates over the expressions in the specified file or package
source and looks for calls
to
.C,
.Call,
.Fortran
and
.External.
A list with 4 elements
corresponding to the different
ways to call native routines:within this directory
.C,
.Call,
.Fortran
and
.External
Each element is a character vector
containing the names of the routines
that were called in the R code
via that interface.
It is modelled after checkFF
This does not handle the cases where the name of the native routine is not a simple string, but is computed at run time.
Duncan Temple Lang (duncan@research.bell-labs.com)
x <- getRoutineRefs(package="eda") x$".C" x$".Call"