[R] calling R from C or C++

herodote@oreka.com herodote at oreka.com
Mon Jul 25 08:32:55 CEST 2005


hi all

You should look into the "tests" directory (download the source package extract it and you'll have the tests directory)

there are some exemples on how to embedded R into C.

I've got the same trouble, here nobody want to do that, and i don't know why...
---------- Initial Header -----------

>From      : r-help-bounces at stat.math.ethz.ch
To          : Bahoo <b83503104 at yahoo.com>
Cc          : r-help at stat.math.ethz.ch
Date      : Sun, 24 Jul 2005 10:27:54 -0500
Subject : Re: [R] calling R from C or C++


On 23 July 2005 at 20:18, Bahoo wrote:
| > Hi,
| > 
| > I have C/C++ code from which I wish I could call R
| > to
| > do something useful.
| 
| By calling I mean linking with the R shared library,
| instead of R BATCH.
| 
| In particular, I want to use regression functions such
| as ridge and locfit.  
| 
| > 
| > I saw a 2003 message by Thomas saying that "You can
| > compile R as a shared library, which allows you to
| > construct and evaluate R expressions from C."  Any
| > more information would be helpful.  I am looking for
| > some documentation that has a more step by step like
| > instructions.  Anyone who has experience, please
| > point
| > me to some resources.
| > 
| > ps. There is a document on CRAN named "Writing R
| > extensions" which seems relevant, but it was too
| > difficult for me to understand.

Just get the Magic Wand from the Harry Potter books; that way you get the
functionality for free without having to read those pesky and difficult
documents we provide to explain how to do the other way -- when your Magic
Wand is broken.

Dirk, who still wants chocolate to grow on trees, preferably in his backyard

| R-help at stat.math.ethz.ch mailing list
| https://stat.ethz.ch/mailman/listinfo/r-help
| PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  (hint !)


-- 
Statistics: The (futile) attempt to offer certainty about uncertainty.
         -- Roger Koenker, 'Dictionary of Received Ideas of Statistics'

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


////////////////////////////////////////////////////////////
// Webmail Oreka : http://www.oreka.com
////////////////////////////////////////////////////////////




More information about the R-help mailing list