[Rcpp-devel] A beginners guide to Rcpp

Gabor Grothendieck ggrothendieck at gmail.com
Fri Nov 30 01:08:43 CET 2012


On Thu, Nov 29, 2012 at 10:37 AM, Hadley Wickham <h.wickham at gmail.com> wrote:
>> Nice document but it would be good to distinguish between the C
>> interfaces -- the .C interface may not be fully general; however, it
>> is adequate for a lot of numerical work such as writing the objective
>> function and gradient in optimization routines and is not painful at
>> all.
>
> I guess my argument would be that if you know Rcpp, you don't need to
> know the C interface. If you know the C interface, you're still better
> off learning Rcpp if you want to tackle anything more complicated.
>
> i.e. if you only have the time to learn one of Rcpp, .C, or .Call,
> you're better off learning Rcpp.
>  That's not to say .C or .Call are not useful to know, but they're
> probably not that useful to learn unless you already known how to
> program in C.  If you don't know how to program in C++, it's still
> worthwhile to learn Rcpp.

That is only the case if you don't know C or C++ .  Many people who
are using these interfaces already know C and in that case the  .C
interface is trivial (its just a simple interface) whereas Rcpp is a
new environment you have to learn to program in.

The trivial amount of time to learn .C for anyone who knows C is
hardly comparable to the effort to learn a new environment even if
that environment is a nice one.

--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com


More information about the Rcpp-devel mailing list