[R] an eval/parse trivia

Vincent Detours vdetours at ulb.ac.be
Wed Dec 10 19:36:28 CET 2003


Dear all,

Any cue on how to evaluate x?

> x
[1] structure(c("GO:0004707", "GO:0005524", "GO:0004674",
"GO:0006468", "GO:0000074", "GO:0008372", "GO:0016740"), .Names =
c("NAS", "NAS", "IEA", "IDA", "NAS", "ND", "IEA"))
6204 Levels: GO:0000074 GO:0000158 GO:0000163 GO:0000166 ...
structure(c("GO:0019538", "GO:0016706"), .Names =
c("IEA", "IEA"))
> parse(text=x) #a failed attempt
expression(2287)
> eval(parse(text=x))
[1] 2287
>

Any idea? By the way why does parse return 2287? 

Thanks for your help,

Vincent Detours




More information about the R-help mailing list