Skip to content
Prev 25138 / 63424 Next

inline C/C++ in R: question and suggestion

Thanks for the vectorization solution.
I can make it optional. I was just thinking that C++ would be more
general than C. I was also asked to create a .C interface, which to me
has the only difference that one needs to preallocate the result. But
the same is easy to implement by pre-allocating an R variable and
passing it as an argument with NULL return.
:) It would be nice, but I doubt it is feasible at all and if yes, the
overhead will be enormous, especially weighted by the number of people
using it.

However, what I would consider reasonable is to have such an inline
interface to more than just C and C++. There is something for Ruby I
think, but one could think of generalizing it somehow.

Best,
Oleg