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? Crispin -------------------------------------------------------- This email is confidential and intended solely for the use o...{{dropped}}
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
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?get("bob") Uwe Ligges> Crispin > > -------------------------------------------------------- > > > This email is confidential and intended solely for the use o...{{dropped}} > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help