From Roger.Bivand at nhh.no  Thu Oct 21 13:55:22 2004
From: Roger.Bivand at nhh.no (Roger Bivand)
Date: Thu Oct 21 13:55:35 2004
Subject: [Rd] C++ dev 
In-Reply-To: <001a01c4b75c$1c802190$e63631c1@Cysteine>
Message-ID: <Pine.LNX.4.44.0410211350300.4411-100000@reclus.nhh.no>

On Thu, 21 Oct 2004, Sandrine Coelho wrote:

> Hello,
> I wish to use R functions in a C++ programm.

> I have installed D COM Server but with this application i think it isn't
> possible to acces mouse event..., is it true?

> My second idea is to compile libraries which are used, but i haven't
> source code, and the libraries existing are compiled under unix, but i'd
> like have .lib and .dll

I think the second choice is feasible for your needs, avoiding the 
overhead of writing your own application with a COM client. An example is 
the ongoing work on embedding R into Terralib:

http://www.est.ufpr.br/myR

which you may find interesting to look at - they say:

"There are three ways to have access the functions of the R. These options 
have advantages and disadvantages. The first form is to call it from 
batch, that is a system call, and has as disadvantage to call the R all 
time that it has a statistic operation to be executed. The second way is 
using the Rserve, that is a server TCP/IP, and is necessary a connection 
for the net. The third option is using the dynamic library libR. The only 
disadvantage of this option is the implementation of the access interface. 
Therefore our work focus on the development of this interface.

The functions implemented are: to initialize R, to declare and to liberate 
variables inside, and to execute R functions. myR has proved steady and 
robust as an interface with R. Further development consists of using myR 
in a real program, the TerraLib/TerraView, a GIS free and open source 
software."

The source code (sorry, for Linux) is there, but I believe the developers 
have Windows experience too.

You may find some of the functions they use useful if this is connected to 
GEOXP.

Best wishes,

Roger

> Thanks for your informations
> Sandrine
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand@nhh.no


[Rd] C++ dev
Roger Bivand