[Rd] package: 'inline' to inline C or C++ code in R functions
osklyar at ebi.ac.uk
Wed May 23 17:52:40 CEST 2007
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
More information about the R-devel