Description Usage Arguments Value Author(s)
These three functions (and associated methods) perform the
code generation to marshal values between R and C/C++.
coerceRValue
is used in the R wrapper function
to ensure that the argument is coerced to the appropriate
type in R before being passed to the C code. This can perform
explicit coercion to change the object and also raise errors if it is
not appropriate.
convertRValue
generates C/C++ code to convert an R value given as a SEXP
to the specified target type in C/C++.
And convertValueToR
is used for converting native types
to their R equivalents when they are being returned to R,
e.g. as return values of routines or copying fields in a struct/class
back to R.
1 2 3 4 | convertRValue(to, name, parm, parameters, typeMap = list(), helperInfo = NULL)
coerceRValue(name, parm, caller = NULL, typeMap = list(), helperInfo = NULL)
convertValueToR(name, parm, parameters, invoke = "", typeMap = list(),
out = FALSE, helperInfo = NULL, ...)
|
to |
the description of the native type to which the R value is to be converted. |
name |
the name of the C-level variable holding the R object. |
parm |
the type description for the target parameter. This is an
object derived from |
parameters |
a named list of the other paramter types. (Is this sometimes a character vector with just the names?) |
typeMap |
an object that provides customized options for different C/C++ types for any of the three different operations. |
invoke |
? |
helperInfo |
currently ignored. |
out |
currently ignored. |
caller |
an object that describes the routine that is calling for the coercion of the R object. |
... |
support for parameters that can be defined by particular methods |
These functions return code segments.
Duncan Temple Lang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.