I would like to, within my c++ code that will be called in an R package (use .C function in R), call a function from a specific R package (The function does not belong to base R). Based on my searches, we could include R.H and Rmath.H files in the case of Base R functions are needed (e.g. rnorm or pnorm). However, the specific function I need to call within the c++ file belongs to a standalone package (condMVN from condMVNorm package).
My guess is that we need to find header files for the condMVNorm package that include the header for the condMVN function. Then including this header file would allow me to compile the c++ code and call this compiled function in R using .C. However, I have difficulties in finding an affirmative answer to my question and finding the header files from the condMVNorm package.
References:
-https://dms.umontreal.ca/wiki/index.php/Writing_R_Extensions#The_R_API:_entry_points_for_C_code
Any help or suggestions would be appreciated. Thanks for your time.