[Rd] Question on parsing R code from C

KR krunal.rao78 at gmail.com
Wed Nov 9 00:53:01 CET 2011

Simon Urbanek <simon.urbanek <at> r-project.org> writes:
> Except that you don't know what are macros, inlined functions and actual 
functions. If you are careful you
> can possibly fall back to external functions but, obviously, your code will be 
less efficient. I would
> still prefer including Rinternals.h - you must have a *really* good reason to 
not do so ;)

Hmmm yes there are good motives (I am not completely unreasonable, yet :P) but I 
could probably cope with it if there is no other way.

Regarding the rest of the e-mail, please let me be clearer on what my goal is. I 
would need a function to create and initialize an R state, a function to close 
the state, and a function (R_ParseVector?) that takes as input the R state and a 
string (containing R code), evaluates the code and return an "error code" 
(error, incomplete, done) plus (eventually) a string containing the output of 
the computation.

In my application I do not have any UI elements (it's console based), but I 
would like calls to plot in R (and other functions using the graphic device) to 
function as they would under R.exe (on windows), i.e. have persistent windows 
popped up which you can resize ecc ecc. I naively thought that these graphic 
capabilities came automatically with the R_ParseVector via some threading 

Thanks for all your comments!


More information about the R-devel mailing list