Re: [Rd] Embedding R in other applications as a scripting language

2024-10-13 Thread Dirk Eddelbuettel
Hi Bryce, On 14 October 2024 at 09:13, Simon Urbanek wrote: | If you are willing to use C++ then RInside is a nice package that wraps the R API in C++ classes for easier use: https://github.com/eddelbuettel/rinside simplifying it quite a bit. Thanks for mention, Simon! And yes, embedding R is

Re: [Rd] Embedding R in other applications as a scripting language

2024-10-13 Thread Simon Urbanek
Bryce, embedding R varies from easy to very complex depending on what you want to do with it. If all you want is to evaluate R commands and get the result values then it is easy: you just initialize R with Rf_initialize_R() and use R_tryEval() to evaluate what you need (making sure you stay on

Re: [Rd] Embedding R Engine in Cocoa

2009-03-17 Thread Simon Urbanek
On Mar 17, 2009, at 15:51 , David Zwerdling wrote: Hello Everyone, I'm attempting to use the R-Engine from the Mac R.app GUI project to embed R in an Objective-C application I'm writing. However, after a few days of trying, dependencies to the GUI keep tying me down. I don't need anythin

Re: [Rd] embedding R in c++ (Qt) application

2008-06-19 Thread Peter . Peyk
Hi Dirk, ok - now it works. All the MACROs scared me a little, but now I've found them in Rinternals.h and Rdefines.h . There was a section in the official manual referring to these, but this section was not introduced for embedded R but for calling c++ from R - this is why i didn't find it at

Re: [Rd] embedding R in c++ (Qt) application

2008-06-19 Thread Dirk Eddelbuettel
Peter, On 19 June 2008 at 17:37, [EMAIL PROTECTED] wrote: | Hi Dirk, | | I've had a closer look now at Rcpp and I've found a lot | of constructors and functions that take SEXPs as input - so the way back from | R to C++ seems clear to me. | | However, I don't know how to pass my data from c++ t

Re: [Rd] embedding R in c++ (Qt) application

2008-06-19 Thread Peter . Peyk
Hi Dirk, I've had a closer look now at Rcpp and I've found a lot of constructors and functions that take SEXPs as input - so the way back from R to C++ seems clear to me. However, I don't know how to pass my data from c++ to R . I've managed to have the embedded R evaluate commands (construct ve

Re: [Rd] embedding R in c++ (Qt) application

2008-06-19 Thread WINSTON, Rory, GBM
Hi Peter Just a note on the SETCAR, SETCADR, macros etc. - if you look at an introductory Lisp or Scheme tutorial, you will see the origins of these names, and hopefully their behaviour will make sense ;-) Cheers Rory

Re: [Rd] embedding R in c++ (Qt) application

2008-06-18 Thread Peter . Peyk
Dirk, that sounds exactly like what I've been looking for. Thanks a lot! Peter Peter, On 18 June 2008 at 14:13, [EMAIL PROTECTED] wrote: | Hi R-Developers, | | I'm working on running statistical analyses with embedded R from a | Qt-GUI-application (C++). | | I've been able to link with R libr

Re: [Rd] embedding R in c++ (Qt) application

2008-06-18 Thread Dirk Eddelbuettel
Peter, On 18 June 2008 at 14:13, [EMAIL PROTECTED] wrote: | Hi R-Developers, | | I'm working on running statistical analyses with embedded R from a | Qt-GUI-application (C++). | | I've been able to link with R libraries, but I'm having a hard time to | understand the C-coding examples. I'm

Re: [Rd] Embedding R

2008-01-13 Thread Hin-Tak Leung
Hmm, you need to read R-exts throughoutly. There are tonnes of information in there, and a few chapters devoted to the topics you are after. As for actual examples - the known GUIs - Rgnome on unix (which AFAIK is no longer maintained but still useful as an example, I guess), Rgui on windows, a

Re: [Rd] Embedding R

2008-01-12 Thread Dirk Eddelbuettel
On 12 January 2008 at 17:28, [EMAIL PROTECTED] wrote: | hello all, | | is there somewhere a comprehensive documentation for the (C) functions used | for embedded R? (e.g. the functions which are used in the directory | \tests\Embedding in the R source) | or | Are there somewhere many more exampl

Re: [Rd] Embedding R and registering routines

2007-05-02 Thread Duncan Temple Lang
Simon Urbanek wrote: > Duncan, > > I see your point. But in that case Apache is the one managing the > life of the so, not R, and in many cases unloading the module would > also mean to unload R in which case the problem doesn't arise. Not quite. If apache loads mod_perl and mod_R, say, and

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Simon Urbanek
Duncan, I see your point. But in that case Apache is the one managing the life of the so, not R, and in many cases unloading the module would also mean to unload R in which case the problem doesn't arise. Also that general case requires that R and the embedding application agree on the dyl

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Simon Urbanek
Seth, On May 1, 2007, at 5:59 PM, Seth Falcon wrote: > Simon Urbanek <[EMAIL PROTECTED]> writes: > >> Duncan, >> >> are you going to take care of this? I have a quick solution for R- >> devel that adds a special entry if requested. >> >> I'm not quite convinced that we need as much flexibility a

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Seth Falcon
Simon Urbanek <[EMAIL PROTECTED]> writes: > Duncan, > > are you going to take care of this? I have a quick solution for R- > devel that adds a special entry if requested. > > I'm not quite convinced that we need as much flexibility as adding > arbitrary DllInfos, because the embedding applicati

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Duncan Temple Lang
Simon Urbanek wrote: > Duncan, > > are you going to take care of this? I have a quick solution for R- > devel that adds a special entry if requested. If you want to go ahead, be my guest. I'm somewhat occupied for the next few days... > > I'm not quite convinced that we need as much flexibili

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Simon Urbanek
Duncan, are you going to take care of this? I have a quick solution for R- devel that adds a special entry if requested. I'm not quite convinced that we need as much flexibility as adding arbitrary DllInfos, because the embedding application is a really special concept (everything else is dy

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Duncan Temple Lang
Simon Urbanek wrote: > Since I'm not sure I really understand Jeff's question this is just > my interpretation, but I think the point was that you may want to > register symbols *not* from a DLL but from the embedding application > itself (e.g. like R.app GUI that embeds libR registers its en

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Simon Urbanek
Since I'm not sure I really understand Jeff's question this is just my interpretation, but I think the point was that you may want to register symbols *not* from a DLL but from the embedding application itself (e.g. like R.app GUI that embeds libR registers its entry for quartz.save). I wou

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Duncan Temple Lang
Jeffrey Horner wrote: > Hello, > > The use of .Call and the like all depend on loading shared libraries and > registering routines from it. Also, .Primitive and .Internal depend on > routines being registered in the R binary. And applications that embed R > can override routines declared in Rin

Re: [Rd] Embedding R in C application

2005-06-24 Thread Chad.P.Jenness
-project.org Subject: Re: [Rd] Embedding R in C application You need to read the correct part of the manual (and you need a manual from R >= 2.1.0). You are writing a front-end, so read * Linking GUIs and other front-ends to R:: as Duncan suggested. Your comments are not at all consistent w

Re: [Rd] Embedding R in C application

2005-06-24 Thread Prof Brian Ripley
> Thanks, > Chad Jenness > 763-229-0427 > > > -Original Message- > From: Duncan Murdoch [mailto:[EMAIL PROTECTED] > Sent: Friday, June 24, 2005 8:30 AM > To: [EMAIL PROTECTED] > Cc: r-devel@r-project.org > Subject: Re: [Rd] Embedding R in C application >

Re: [Rd] Embedding R in C application

2005-06-24 Thread Chad.P.Jenness
al Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Friday, June 24, 2005 8:30 AM To: [EMAIL PROTECTED] Cc: r-devel@r-project.org Subject: Re: [Rd] Embedding R in C application On 6/24/2005 9:18 AM, [EMAIL PROTECTED] wrote: > To whom it may concern, > I am very interested in

Re: [Rd] Embedding R in C application

2005-06-24 Thread Duncan Murdoch
On 6/24/2005 9:18 AM, [EMAIL PROTECTED] wrote: > To whom it may concern, > I am very interested in embedding the R functionality in our > application. This is a C application that currently runs on Win32, but > will also run on Linux in the future. From the material that I have > seen, I need R co