RInside Help in Testing

Using RInside to automate replication of C/C++ library tests in R packages.
Author

Balasubramanian Narasimhan and Anqi Fu

Published

April 1, 2019

This post was originally published on R Views.

When developing R interfaces to C/C++ libraries, a common challenge is efficiently replicating existing C/C++ tests in R. We used RInside—which allows one to embed R inside C/C++—to solve this problem for the ECOSolveR package, automating the translation of approximately 28 C tests containing large data structures into R test fixtures using testthat.