Have you ever wanted to create an R package that calls C code, but didn't know where to start? Look no further! `Now You C Me` is a post dedicated to teaching you the bare minimum to create an #rstats package with C that passes CRAN's checks. Enjoy! blog.davisvaughan.com/2019/0…
12
88
2
343
I really think in almost all cases people are better off using Rcpp than trying to use the C interface directly. Particularly those less familiar with low level compiled languages.
3
1
7
I huge benefit of learning C in R is that it will help you learn and understand the mostly-C R sources. Obviously not for everyone, but if you're interested in understanding the details of R and you're thinking of starting a pkg in C vs C++, this is a factor to consider.
4
5
Both points are valid: - when teaching, I show 'bare-bones' approaches so Rcpp tutorials include bits about manual compiling and linking; and C language understanding is indeed useful - yet often we prefer not to have to worry about low-level details hence the Rcpp popularity

Mar 3, 2019 · 10:29 PM UTC

1
3
Like derivatives using limits, and solving systems of linear equations by hand. You gain understanding by learning "the hard way". After understanding, do the easier thing. Or, if you prefer, do the easier thing 1st, then gain understanding when it breaks and you have to fix it.
3