From edd at debian.org  Sun Dec  3 18:47:21 2006
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sun, 3 Dec 2006 11:47:21 -0600
Subject: [Rd] passing matrix as argument to a C function
In-Reply-To: <000f01c716fa$c26ee0f0$0202a8c0@headquarters.silicoinsights>
References: <Pine.LNX.4.64.0612030815290.3004@gannet.stats.ox.ac.uk>
	<000f01c716fa$c26ee0f0$0202a8c0@headquarters.silicoinsights>
Message-ID: <17779.3497.873303.970110@basebud.nulle.part>


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 --- it makes interfacing R and C++ a
whole lot easier.  I cannot recommend it highly enough. 

But if you don't yet know C++ it provides yet another learning curve so you
may not want to go there quite yet...

Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison



[Rd] passing matrix as argument to a C function
Dirk Eddelbuettel