Beginner internal development: rcpp or devtools?


I'm starting to develop an internal package for my company to use & see that at startup I can use either devtools or rcpp: what's the difference between these two things (or four, since there are two sub-types of rcpp including rcppParallel and rcppArmadillo)? are they just templates? or is this like the difference between learning base r and the tidyverse, where i'll start off with one thing and much later find out that the other was way easier and better for my purposes?

I'm by far the heaviest user of R on my team but am hoping that developing a package with good templates & things we use consistently would increase usage among others.



I'm not sure I understand what's the overlap in functionality between packages you've mentioned.

Rcpp is a way to use C++ from R. devtools is a package that claims to be "Tools to Make Developing R Packages Easier". They are not doing similar things.


I would recommend using the usethis package. It streamlines getting your environment set up and guides you towards best practice.

Good luck!


Totally fair! I don't use C++ at all and can't imagine it for the future but if someone comes along who does, or if it turns out that would've been a useful thing to have integrated, I don't want to have to start over--trying to avoid headaches for future developers. Does that make sense?


oh that's SUPER helpful! Thanks!


In fact, devtools has the same function (namely, devtools::use_rcpp) that set's up the environment to use it in a "best practice" way.

But yeah, usethis is pretty cool. I used it just today :slight_smile: