The idea is to pass matrices/vectors from R to C++, write pure C++/Armadillo code for the computation, and then export the result back to R with the proper data structures.
❯ checking compiled code ... NOTE
File ‘cpp11armadillotest/libs/cpp11armadillotest.so’:
Found ‘_ZSt4cerr’, possibly from ‘std::cerr’ (C++)
Object: ‘02_eigen.o’
Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf.
See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
❯ checking compiled code ... NOTE File ‘cpp11armadillotest/libs/cpp11armadillotest.so’: Found ‘_ZSt4cerr’, possibly from ‘std::cerr’ (C++) Object: ‘02_eigen.o’
Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs nor [v]sprintf.
See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.