title: Call a function from a R package in C++
body: <p>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).</p>
  <p>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.</p>
  <p>References:</p>
  <p>-https://dms.umontreal.ca/wiki/index.php/Writing_R_Extensions#The_R_API:_entry_points_for_C_code</p>
  <ul>
  <li><a href="https://udel.edu/%7Ecaviness/Class/CISC181-03F/C++HeaderFiles.html" rel="nofollow noreferrer">https://udel.edu/~caviness/Class/CISC181-03F/C++HeaderFiles.html</a></li>
  </ul>
  <p>Any help or suggestions would be appreciated. Thanks for your time.</p>