[R] Parse Expression
livia
yn19832 at msn.com
Mon Dec 17 11:54:31 CET 2007
Hello everyone, I would like to construct a datafram with the following
command.
eval(parse(text=paste("df=data.frame(", cmd, ")", sep="")))
But it comes out " Error in parse(file, n, text, prompt, srcfile, encoding)
:
syntax error, unexpected $undefined, expecting ',' in
"df=data.frame(cbcDummy10to12 = 1,cbcForeWrld_Ret = 1,cbcYC10-2_"
"cmd" is a character string I obtained before, it is like:
cmd
[1] "cbcDummy10to12 = 1,cbcForeWrld_Ret = 1,cbcYC10-2_wld = 1"
Could anyone give me some advice? Many thanks.
--
View this message in context: http://www.nabble.com/Parse-Expression-tp14370218p14370218.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list