[R] converting strings to expressions

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Sep 14 22:35:27 CEST 2006


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> On Thu, 14 Sep 2006, Deepayan Sarkar wrote:
> 
> [...]
> 
> > Ah, I'd forgotten about parse. A link from ?expression might be reasonable.
> 
> But it says
> 
> Details:
> 
>       'Expression' here is not being used in its colloquial sense, that
>       of mathematical expressions.  Those are calls (see 'call') in R,
>       and an R expression vector is a list of calls, typically as
>       returned by 'parse'.
> 
> so it already has a link.
> 
> 'Expression' was often misused in the R documentation, and a couple of
> months ago I tried to move to a more careful usage.

Actually, you need to be even more careful because has commonly been
called "unevaluated expressions" cover symbols and constants too.
I.e., quote(1) and quote(x) are not calls. And such non-call objects
can be elements of an expression vector.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list