[Rd] handling a matrix and .C

Wilm Schumacher dawiacount at gmx.de
Mon Nov 24 19:58:55 CET 2008


Hello R-devel,

I want to write extensions for R in C (maybe C++ and Fortran later) and it works fine, but there is one problem, which I cannot solve (in my view).

I want to handle a matrix from R in C. For arrays there is "as.double(...)", but nothing for a matrix.

I searched a while, but didn't find something.

Last I looked at the source code of e1071 and of the core itself and recognized (I hope I understood this), that you (and the "e1071" people) use "as.double()" and give ".C" an array and one have to "parse" the matrix again in the C function.

This sounds a little complicate. Isn't there another way? A more adapted way?

Greetings

Wilm

ps: I joined the R-devel list, but didn't get an confirmation mail. I hope this is normal
--



More information about the R-devel mailing list