[Rd] suggestion of new API function for embedded programming.
Luke Tierney
luke at stat.uiowa.edu
Wed Sep 3 18:07:29 CEST 2008
On Wed, 3 Sep 2008, EBo wrote:
> Luke Tierney <luke at stat.uiowa.edu> said:
>
>> ...
>>> do something like the following:
>>>
>>> R_Expr = R_Parse1Buffer(&R_ConsoleIob, 0, &status);
>>> if (PARSE_OK==status) {
>>> ...
>>> value = eval(R_CurrentExpr, rho);
>>> ...
>>> }
>>
>> We definitely do NOT want this frozen into the public API.
>
> What is your objection with making something like this a part of the public
> API? I understand that having to use the IOBuffer seems a bit much, but I do
> not understand your concern.
We need the freedom to completely change these internals if doing so
proves useful.
luke
>>> or possibly simplifying the interface to take the CMDL string:
>>>
>>> R_Expr = R_Parse1Line("t.test(x,conf.level=(1-p))$conf.int[2]", &status);
>>
>> Something along these lines should be feasible in principle, though
>> care may be needed in handlign of errors.
>
> Agreed. I would also add that R_Parse1Line should also not modify any global
> variables so that it basicall functions independently and does not violate the
> law of least surprise. This imples that an environment would also be passed in:
>
> R_Expr=R_Parse1Line("t.test(x,conf.level=(1-p))$conf.int[2]", rho, &status);
>
> Thanks and best regards,
>
> EBo --
>
>
--
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa Phone: 319-335-3386
Department of Statistics and Fax: 319-335-3017
Actuarial Science
241 Schaeffer Hall email: luke at stat.uiowa.edu
Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
More information about the R-devel
mailing list