From guillaume.yziquel at citycable.ch  Sat Oct 10 23:13:26 2009
From: guillaume.yziquel at citycable.ch (Guillaume Yziquel)
Date: Sat, 10 Oct 2009 23:13:26 +0200
Subject: [Rd] Help with OCaml bindings for R interpreter.
In-Reply-To: <B51426EB-E81F-4118-AB25-C25DEF2F43E4@r-project.org>
References: <4AD0E629.9060603@citycable.ch>
	<B51426EB-E81F-4118-AB25-C25DEF2F43E4@r-project.org>
Message-ID: <4AD0F8F6.8020306@citycable.ch>

Simon Urbanek a ?crit :
> 
> On Oct 10, 2009, at 3:53 PM, Guillaume Yziquel wrote:
> 
>> However, as it now stands, the binding is not fully functional: When an
>> OCaml program is compiled with this binding, to generate, say,
>> myprog.byte, it is necessary to run
>>
>>     R CMD ./myprog.byte
>>
>> in order for the program to work as expected. I would therefore like to
>> know how to *completely* embed the R interpreter inside my binding.
> 
> It *is* completely embedded. R CMD simply sets up the correct 
> environment for the current R.

OK. I just stumbled a minute or two ago on:

http://cran.r-project.org/doc/manuals/R-exts.html#Embedding-R-under-Unix_002dalikes

I now get it.

> For a given, specific R installation you 
> could re-create the environment in the executable (see R CMD sh -c set), 
> but by definition it is specific for that installation so you'd have to 
> compile that binary at install time.

OK. So it seems that there will be some more work needed in order to 
hide that completely to the OCaml end-user.

> Cheers,
> Simon

Thanks a lot.

-- 
      Guillaume Yziquel
http://yziquel.homelinux.org/



[Rd] Help with OCaml bindings for R interpreter.
Guillaume Yziquel