search for: mytraj

Displaying 1 result from an estimated 1 matches for "mytraj".

Did you mean: mtraj
2013 Dec 16
1
External pointers and changing SEXPTYPE
...NR )); for( ix = 0; ix < efldNR; ix++ ) SET_STRING_ELT(mydata->ans_nms, ix, mkChar(vnames[ix])); // later I bind values of non-R variables from my data structure to a proper vector PROTECT(mydata->ans = Rf_allocVector(VECSXP, efldNR )); Rf_setAttrib(mydata->ans, R_NamesSymbol, mytraj->ans_nms); SET_VECTOR_ELT(mydata->ans, 0, mydata->R_a ); SET_VECTOR_ELT(mydata->ans, 1, mydata->R_b ); ... // all protects get unprotected before return // finalizer is registered as well return Rdata; Later on in read_my_data() I read the pointer: my_data_ptr *mydata...