Description Usage Arguments Value Note Author(s) See Also
These constructor functions are used to create a text representation of code that we can output later. We can represent a C routine or an R function with the actual definition and also its name and declaration/prototype for C routines.
1 2 3 4 5 | CRoutineDefinition(name, code, nargs = NA,
declaration = getDeclaration(code),
className = character(),
obj = new("CRoutineDefinition"),
formatCode = TRUE)
|
name |
the name of the C routine |
code |
a character vector giving the code for the routine including the declaration, etc. The return type should be on a separate line.(?) |
obj |
the object to be filled in and returned |
nargs |
the number of parameters |
className |
if specified, this is used to provide the namespace qualifier for the function. |
declaration |
the declaration for the routine. This will be enclosed within a |
formatCode |
a logical value controlling whether to process the text of the code to format it appropiately. |
An object of class CRoutineDefinition-class
or RFunctionDefinition-class
depending on which
constructor is invoked!
The RCode function uses S3-style classes and is less structured than the C routine representation as it does not need to know the name of the function, etc. but is merely a textual representation of R code.
Duncan Temple Lang
Any functions that we use to generate a C/C++ routine definition or an R function or R code.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.