[R] environments

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Oct 17 18:07:49 CEST 2003


Is get("bob") what you are looking for?

It is the usual way to go from the name of an R object (as a character 
string) to the actual object.

On Fri, 17 Oct 2003, Crispin Miller wrote:

> Hi,
> I have a string representing an environment:
> 
> "bob"
> 
> And an environment
> > bob
> <environment: 0x3901234ac>
> How do write a function that takes the string and returns the
> environment?

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