[R] substitute
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri May 16 13:12:18 CEST 2003
On Fri, 16 May 2003, Wladimir Eremeev wrote:
> I have troubles with 'substitute'.
> I have the data frame with vectors data$area.0, data$area.20, etc...
> Command
>
> substitute(data$area.lon,list(lon=20))
>
> returns
>
> data$area.lon
>
> but is expected to return data$area.20
>
> Where did I do mistakes?
The symbol is area.lon, not lon. substitute only work on whole symbols,
and `.' is just part of the alphabet allowed in syntactic names.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list