Creating a simple R package with C++ code to sum “x + 1”

A tutorial on creating a simple R package that includes C++ code for a basic operation (video).
Author

Mauricio “Pachá” Vargas S.

Published

September 10, 2025

If this post is useful to you I kindly ask a minimal donation on Buy Me a Coffee. It shall be used to continue my Open Source efforts. The full explanation is here: A Personal Message from an Open Source Contributor.

You can send me questions for the blog using this form and subscribe to receive an email when there is a new post.

Here I show you how to use usethis and devtools to create a minimal R package with C++ code. No fluff—just a simple example to keep things clear and easy. Thanks a lot to the user that asked me about making videos!