[R] ls() pattern

Richard.Cotton at hsl.gov.uk Richard.Cotton at hsl.gov.uk
Mon Dec 17 12:20:51 CET 2007


>    I am sorry I have to bother you again. I am trying your conmmands
> and until the "cmd" part, it looks fine.
>    So I call "cmd", it gives the following output:
> 
>   [1] "cbcDummy10to12 = 1,cbcForeWrld_Ret = 0.04,cbcYC10-2_wld = 64,
> cbcEP_us = 0.5,cbcDelta102YC_wld = 8,cbcGold = 2"
> 
>    But after that, if I call: eval(parse(text=paste("df=data.
> frame(", cmd, ")", sep="")))
> 
>    It says: Error in parse(file, n, text, prompt, srcfile, encoding) : 
>     syntax error, unexpected $undefined, expecting ',' in "df=data.
> frame(cbcDummy10to12 = 1,cbcForeWrld_Ret = 0.04,cbcYC10-2_"

cbcYC10-2_wld is an invalid variable name, since it contains a minus sign.

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}



More information about the R-help mailing list