From luke at stat.uiowa.edu  Wed Sep  3 18:07:29 2008
From: luke at stat.uiowa.edu (Luke Tierney)
Date: Wed, 3 Sep 2008 11:07:29 -0500 (CDT)
Subject: [Rd] suggestion of new API function for embedded programming.
In-Reply-To: <twig.1220454941.83227@swcp.com>
References: <twig.1220449912.10283@swcp.com>,
	<twig.1220449912.10283@swcp.com> <twig.1220454941.83227@swcp.com>
Message-ID: <alpine.LFD.1.10.0809031106210.28931@nokomis.stat.uiowa.edu>

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



[Rd] suggestion of new API function for embedded programming.
Luke Tierney