From osklyar at ebi.ac.uk  Wed May 23 17:52:40 2007
From: osklyar at ebi.ac.uk (Oleg Sklyar)
Date: Wed, 23 May 2007 16:52:40 +0100
Subject: [Rd] package: 'inline' to inline C or C++ code in R functions
In-Reply-To: <46534A0A.6050508@stats.uwo.ca>
References: <46532F64.9030203@ebi.ac.uk> <46534A0A.6050508@stats.uwo.ca>
Message-ID: <46546348.5070605@ebi.ac.uk>

Dear all,

following the earlier discussion, I've made a couple of changes to
'inline' (http://www.ebi.ac.uk/~osklyar/inline). As announced before the
idea of the package is to enable inlining C or C++ code in R functions
using only R sources. The changes include:

- it is possible to select between C and C++
- it is possible to declare a standard R function calling a C/C++
  routine or an S4 method with a fixed signature
- setCMethod accepts single of multiple method signatures in a list, all
  put in one shared object
- readline syntax is used in the example for a multiline C++ source :)

Thanks Duncan, Simon and Deepayan for useful comments!

Not tested on Windows, I would be thankful if somebody could do it.

Duncan Murdoch wrote:
> Another suggestion:
> 
> You might want to allow a list of signatures and code chunks to be
> passed to the compiler, producing a list of functions to evaluate them,
> all compiled into one DLL.

Simon Urbanek wrote:
> I really like the idea! Except for the fact that it's forcing the use
> of C++ which adds unnecessary overhead :P I'd like a configurable
> extension [including .m] and the ability to prepend functions as code.

-- 
Dr Oleg Sklyar * EBI/EMBL, Cambridge CB10 1SD, England * +44-1223-494466



[Rd] package: 'inline' to inline C or C++ code in R functions
Oleg Sklyar