[Rd] How to use R and add-on packages as library in C/C++

Pai-Hsien Hung pshung at mail2000.com.tw
Fri Aug 18 15:48:44 CEST 2006


Hi,
  I have a question for building a standalone exe file via C/C++ with R and add-on packages in Windows (Compiler is VC).  It may looks like ...

#include <R.h>
#include <Rmath.h>

int main() {
  double *x, *y, z;

  // ... (Variables initial)

  z = ar( x, ...); 
  // In this example, I want use the ar (time series) function (in stats package) 
  // as a library funciton.

  // ... (Other statement)

  return 0;
}

  In the "Writing R Extensions" manual, just demo with numerical functions, not statistical functions.  I don't know is it possible to use statistical functions (Time series at least) or other functions in the add-on package, and how to make it.  Thanks for your patient to reading this. ^^



More information about the R-devel mailing list