From krunal.rao78 at gmail.com  Wed Nov  9 00:53:01 2011
From: krunal.rao78 at gmail.com (KR)
Date: Tue, 8 Nov 2011 23:53:01 +0000
Subject: [Rd] Question on parsing R code from C
References: <loom.20111108T203022-872@post.gmane.org>
	<9465BE63-EA88-4BE2-8D1C-9E33BE8AA45D@r-project.org>
	<loom.20111108T224700-655@post.gmane.org>
	<3D4F776D-4D5D-4C39-90B3-12DF09C5C6BA@r-project.org>
Message-ID: <loom.20111109T001139-68@post.gmane.org>

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 
techniques.

Thanks for all your comments!


Cheers



[Rd] Question on parsing R code from C
KR