[Rd] How to use R and add-on packages as library in C/C++
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Aug 18 16:32:15 CEST 2006
This is indeed in the manual you mention. To use R functions and not just
standalone libRmath, you need to embed R.
On Fri, 18 Aug 2006, Pai-Hsien Hung wrote:
> 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. ^^
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list