Is there a function that takes a string and creates and assigns a variable with that name? Could someone point me in the right direction? Thnx W
On Tue, 4 May 2004 wwsprague at ucdavis.edu wrote:> Is there a function that takes a string and creates and assigns a^^^^^^> variable with that name? Could someone point me in the right direction??assign -- 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
assign(). -roger wwsprague at ucdavis.edu wrote:> Is there a function that takes a string and creates and assigns a > variable with that name? Could someone point me in the right direction? > > Thnx > W > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >
Have you tried "?assign"? That works, as does its converse "get". hope this helps. spencer graves wwsprague at ucdavis.edu wrote:> Is there a function that takes a string and creates and assigns a > variable with that name? Could someone point me in the right direction? > > Thnx > W > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html