[R] how to call a C program from R function
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Aug 28 17:14:19 CEST 2003
On Thu, 28 Aug 2003, Martin Olivier wrote:
> Hi all,
> I would like to call a C program from R function. I tried to use the
> .C() function
> without success. I need a very simple example (such as the hello
> program) to understand
> how it works. Could you give a such example?
There is one in Writing R Extensions. `Hello world' be too simple: you do
need to know how to return results.
> (I use the 1.7.1 Version of R with linux)
> Does it work in the case of a C++ program instead of a C programm?
See Writing R extensions for details and examples.
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-help