[R] How can I get the length of returning array in c++ calling R code?

Song Baiyi song.baiyi at udo.edu
Mon Apr 19 12:23:44 CEST 2004


Hello,

Now I would like to call R code from c++ and R code return a dynamic 
length of integer array.

I used

length(eval(VECTOR_ELT(expression,1),R_GlobalEnv)) 


to return the length of result array in c++, but it did not work.

What can I do to get the length?

Thank you very much!

Baiyi Song

CEI
Dortmund Univercity




More information about the R-help mailing list