From tobias.verbeke at openanalytics.eu  Sat Jul 19 09:09:48 2014
From: tobias.verbeke at openanalytics.eu (Tobias Verbeke)
Date: Sat, 19 Jul 2014 09:09:48 +0200 (CEST)
Subject: [Rd] request of information about creating DLL from R to be
 used in other languages/programs
In-Reply-To: <53C972B8.7090702@gmail.com>
References: <002b01cfa29d$1d66df40$58349dc0$@rennes.inra.fr>
	<53C95856.5000209@gmail.com>
	<20140718202627.Horde.SwZE1DjKjZndQ0h0JM03PQ1@webmail.rennes.inra.fr>
	<53C972B8.7090702@gmail.com>
Message-ID: <870768162.75667.1405753788962.JavaMail.zimbra@openanalytics.eu>

----- Original Message -----
> From: "Duncan Murdoch" <murdoch.duncan at gmail.com>
> To: "Ludovic.Brossard" <ludovic.brossard at rennes.inra.fr>
> Cc: r-devel at r-project.org
> Sent: Friday, July 18, 2014 9:17:12 PM
> Subject: Re: [Rd] request of information about creating DLL from R to be used in other languages/programs
> 
> On 18/07/2014, 1:26 PM, Ludovic.Brossard wrote:
> > Thanks for this answer.
> > If I have well understood, there is no way to create dll and call it
> > without having R installed on the computer ?
> 
> R is open source so you could probably work out something, but there is
> no built-in support for doing that.

As a (potential) alternative solution to the problem, you may want to address R functionality over RESTful web services, using e.g. the R Service Bus.
Then your Delphi clients can all make use of a single central installation of R.

See

http://rsb.doc.openanalytics.eu/dev/

for the technical documentation and

http://rsb.doc.openanalytics.eu/dev/wsdocs/index.html

for the API overview.

Best,
Tobias

> 
> Duncan Murdoch
> 
> > Sorry if I am wrong i am not a specialist.
> > thanks
> > 
> > Ludovic Brossard
> > 
> >> On 18/07/2014, 10:29 AM, Ludovic Brossard wrote:
> >>
> >>> Hello
> >>>
> >>>
> >>>
> >>> My question is the following. I have tried to find a similar subject in
> >>> archives but not found (perhaps bad search!) and I tried R-help and I was
> >>> advised that R-devel would perhaps better for my question
> >>>
> >>>
> >>>
> >>> So I wonder if it is possible to create a dll from a R code to use it in
> >>> another language/program.
> >>>
> >>> Indeed, one of my colleague wrote a R code combining some R functions to
> >>> create a method of calculation.
> >>>
> >>> I would want to use this method in a program coded in Delphi.
> >>>
> >>>
> >>>
> >>> Is there possibilities to create a DLL from R code to be called in the
> >>> Delphi program ?
> >>>
> >>> It would allow us to avoid rewriting code and searching correspondence
> >>> between R functions and Delphi program (or other types of tools as
> >>> TPMath).
> >>>
> >>> Is it possible to call a dll form R whereas R is not installed on the
> >>> computer?
> >>>
> >>>
> >>>
> >>> I hope to be clear in my demand an I hope you will be able to give me
> >>> some
> >>> indications or where to find it.
> >>>
> >> Most of this is possible, but not easy.  See chapter 8 of the "Writing R
> >> Extensions" manual.  You are essentially writing a new "front-end" to R,
> >> and it will require R to be installed for it to work.
> >>
> >> Many years ago I wrote instructions for using Delphi to create a DLL for
> >> R to use, which is another approach you could try.  I've no idea how
> >> obsolete those instructions are nowadays, but they might give you some
> >> starting points:
> >>
> >> http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/pascal.html
> >>
> >> Duncan Murdoch
> >>>
> >>> Best regards
> >>>
> >>>
> >>>
> >>> Ludovic Brossard
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Ludovic BROSSARD
> >>>
> >>> UMR PEGASE (Physiologie, Environnement et G?n?tique pour l?Animal et les
> >>> Syst?mes d?Elevage)
> >>>
> >>> INRA ? Agrocampus Ouest
> >>>
> >>> Domaine de la Prise, 35590 Saint-Gilles, France
> >>>
> >>> T?l : 33 (0)2 23 48 70 57 . Fax : 33(0)2 23 48 50 80
> >>>
> >>> <http://www.rennes.inra.fr/pegase> www.rennes.inra.fr/pegase
> >>> <http://www.rennes.inra.fr/pegase>.
> >>>
> >>>
> >>>
> >>>
> >>>         [[alternative HTML version deleted]]
> >>>
> >>>
> >>>
> >>> ______________________________________________
> >>> R-devel at r-project.org <mailto:R-devel at r-project.org> mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-devel
> >>>
> >>
> >>  
> > Ludovic Brossard
> > INRA - UMR PEGASE
> > Domaine de la Prise
> > 35590 SAINT GILLES
> > tel : 02 23 48 70 57
> > fax : 02 23 48 50 80
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



[Rd] request of information about creating DLL from R to be used in other languages/programs
Tobias Verbeke