From dawiacount at gmx.de  Mon Nov 24 19:58:55 2008
From: dawiacount at gmx.de (Wilm Schumacher)
Date: Mon, 24 Nov 2008 19:58:55 +0100
Subject: [Rd] handling a matrix and .C
Message-ID: <20081124185855.152920@gmx.net>

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
--



[Rd] handling a matrix and .C
Wilm Schumacher