From Rory.WINSTON at rbs.com  Tue Nov 25 12:27:34 2008
From: Rory.WINSTON at rbs.com (Rory.WINSTON at rbs.com)
Date: Tue, 25 Nov 2008 11:27:34 +0000
Subject: [Rd] handling a matrix and .C
In-Reply-To: <mailman.19.1227610804.17282.r-devel@r-project.org>
References: <mailman.19.1227610804.17282.r-devel@r-project.org>
Message-ID: <F5AB27C222D4164382737207F9869F2B54171B9DD6@LONMC01014.rbsres07.net>

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

I think this is the simplest way to handle matrices at this level - after all a matrix is really an homogenous array of data with indexing information ?

I have an example of handling matrices (using .Call) in an old post:

http://www.theresearchkitchen.com/blog/archives/113

Cheesr
Rory


***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. 
Authorised and regulated by the Financial Services Authority 

This e-mail message is confidential and for use by the=2...{{dropped:22}}



[Rd] handling a matrix and .C
Rory.WINSTON at rbs.com