Guillaume Yziquel wrote:
> Laurent Gautier a écrit :
>> Guillaume Yziquel wrote:
>>> Hi.
>>>
>>> I'm working on an OCaml binding for R. Namely OCaml-R.
>>>
>>> Could someone point me to the code in rpy which is used to force 
>>> promises (i.e. PROMSXP SEXPs)? That would be really helpful.
>> http://bitbucket.org/lgautier/rpy2/src/tip/rpy/rinterface/rinterface.c#cl-3171
>> line 3171-3177.
> 
> Thank you so much.
> 
> OK. So you simply eval the PROMSXP, as you would with a LANGSXP? That's 
> the kind of information I haven't been able to find on r-de...@... or in 
> the documentation.

Yes. I had the same problems as you, so I looked in the R source for 
places where PROMSXP was used...

> Moreover, you consider using R_tryEval if you want to catch errors, I guess.
> 
>>> Please tell me if my post is off-topic and unwelcome.
>> Well, you are asking implementation details. I cannot find a way to call 
>> this "off-topic" ;-)
> 
> Well, one never knows. It's not exactly rpy that I'm interested in, but 
> my own binding. So I'm taking gloves.

No problem.

>> Best,
>>
>> L.
>>
>> PS: I followed your recent post to r-devel with interest. I considered 
>> making lower level bindings at some point but postponed it to an 
>> unspecified release in the future (if this ever happens).
> 
> Thanks. I'm not doing low-level for the fun of it (even if I believe 
> that being able to natively compile R code through the OCaml compiler 
> would be a valuable offspring), but mostly because I find it really hard 
> to get documentation on the regular API. So I figured out that delving 
> into structures would be interesting, less time-wasting.

The best documentation I found for building a bridge between an other 
language and R is:
- the R source
- the source for what seems to be the only other maintained bridge: JRI

> If you care, you can try out the Debian package on my website. It's 
> always the latest version of OCaml-R that compiles. I'd be interested in 
> any feedback, even it's simply documentation requests, or "doesn't work 
> for me". Moreover, I believe that using OCaml's toplevel pretty-printer 
> to display R values would perhaps be of interest to you. As OCaml is 
> more static and functional than Python, you also have in 
> R.Internal.Pretty module (or more precisely in the 
> R.Internal.PrettyTypes module-argument to the R.Internal.Parser functor) 
> a function called build, which could be seen as work-in-progress 
> specification of the structure of SEXPs.
> 
(...the inside on an R SEXP was exposed here...)

> P.S.: Do you mind if I cross-post to ocaml-r-de...@?
> 

Not at all.




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to