getNativeValue | R Documentation |
This function allows the caller to retrieve the value of a compiled, native object by providing the address of the object and a description of its type/structure. This can be used to retrieve global variables or values that are returned by reference from other calls to compiled routines.
getNativeValue(ptr, type)
ptr |
an external pointer giving the address of the object |
type |
a CIF that describes the type/structure of the object being retrieved |
The R object converted from the native address.
Duncan Temple Lang
libffi
getStructValue
getStructField
ptr = getNativeSymbolInfo("globalStruct")$address
myStruct.type = structType(list(s = sint16Type, i = sint32Type, d = doubleType, str = stringType))
getNativeValue(ptr, myStruct.type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.