Thank you, Dirk. I'll keep this in mind.
-Christos
-Original Message-
From: Dirk Eddelbuettel [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 03, 2006 12:47 PM
To: [EMAIL PROTECTED]
Cc: 'Prof Brian Ripley'; r-devel@r-project.org
Subject: Re: [Rd] passing matrix as
On 3 December 2006 at 11:47, Christos Hatzis wrote:
| Thank you. The code in kmeans.c is indeed informative. One needs to
| remember that an R matrix is a vector with attributes.
In case there is any chance that you could turn your part of the source from
C into C++, try RcppTemplate from CRAN
-project.org
Subject: Re: [Rd] passing matrix as argument to a C function
The data in an R matrix is not stored as double **A, but as double *A: it is
just a vector in R, with attributes.
There are lots of examples of manipulating R matrixes via .C: one is
src/library/stats/src/kmeans.c.
The code for
The data in an R matrix is not stored as double **A, but as double *A: it
is just a vector in R, with attributes.
There are lots of examples of manipulating R matrixes via .C: one is
src/library/stats/src/kmeans.c.
The code for crossprod is not at all hard to find: it is in
src/main/array.c.
Hi,
Although this is not directly an R-related question, it is relevant as I am
trying to port some R code to C to speed things up in a computation.
I am working through my first attempts to generate and link compiled C code
in R. I could make the 'convolve' function to work and similar functio