I have an external pointer object that I'd like to pass from my R code to
some C code. Per Section 5.13 of "Writing R Extensions", I've noted that
"external pointers should only be used as part of an object with normal
semantics, for example an attribute or an element of a list." So I've
written
Thanks Duncan, you've unclogged my thinking. For anybody interested,
see below a sketch of the solution.
Cheers,
James
--START SKETCH OF SOLUTION--
#include
#include
static typedef struct {
int nrow, ncol;
double *data;
} _myparticle_data_struct;
static _myparticle_data_struct mypar
On 11-12-27 5:58 PM, James Muller wrote:
Dear R-devel members,
The question: Is it possible to initialize and later free a large data
structure strictly within a shared C library, to be used by a function in
the C library that I'll call from R--without ever having to pass data to
and from R? Th
Dear R-help members,
*(My apologies for cross-posting to both R-help and R-devel -- this
question straddles both domains...)*
The question: Is it possible to initialize and later free a large data
structure strictly within a shared C library, to be used by a function in
the C library that I'll c
Dear R-devel members,
The question: Is it possible to initialize and later free a large data
structure strictly within a shared C library, to be used by a function in
the C library that I'll call from R--without ever having to pass data to
and from R? This is analogous to C++ object initializatio