Re: [Rd] C++ dev

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Thu 21 Oct 2004 - 21:55:22 EST


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

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri Oct 22 03:50:41 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:23 EST