RcppTN .cpp script works when sourced but not when compiled in library
问题 I am trying to create a R package that uses random draws from a truncated normal in a .cpp script. I am using the rtn1 function from the pckage RcppTN. If I source the code, the function works fine. Once I build the package I get the error: > library(testtruncnorm) > testtruncnorm() Error in testtruncnorm::testtruncnorm() : function 'RcppTN_rtn1' not provided by package 'RcppTN' Simplified .cpp code is here #include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] #include <RcppTN.h> //