Dear all, I have e.g. aaa <- "list(1,2,3,4)" and would like to get a hold on the list list(1,2,3,4) from aaa. Can anyone help with that? Best regards S?ren H?jsgaard
> aaa <- "list(1,2,3,4)" > parse(text=aaa)expression(list(1, 2, 3, 4)) On Mon, 3 Mar 2003, S?ren H?jsgaard wrote:> Dear all, > I have e.g. > aaa <- "list(1,2,3,4)" > and would like to get a hold on the list > list(1,2,3,4) > from aaa. Can anyone help with that?-- 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
S?ren H?jsgaard wrote:> Dear all, > I have e.g. > aaa <- "list(1,2,3,4)" > and would like to get a hold on the list > list(1,2,3,4) > from aaa. Can anyone help with that? > Best regards > S?ren H?jsgaardTry parse(text=aaa) for the expression and eval(parse(text=aaa)) to evaluate it. Uwe Ligges
Soren, try eval(parse(text=aaa)) HTH steve S?ren H?jsgaard wrote:> Dear all, > I have e.g. > aaa <- "list(1,2,3,4)" > and would like to get a hold on the list > list(1,2,3,4) > from aaa. Can anyone help with that? > Best regards > S?ren H?jsgaard > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help