[R] problems with character objects and calls to list()

Mark Lyman mark.lyman at gmail.com
Mon Jul 23 21:22:13 CEST 2007


> Really I'd like the call to list() to behave as though the text had
> been entered directly so that you get....
> 
> > list(1:2, 3:4, 5:6)
> [[1]]
> [1] 1 2
> 
> [[2]]
> [1] 3 4
> 
> [[3]]
> [1] 5 6
>

> eval(parse(text=paste("list(",to.convert,")",sep="")))
[[1]]
[1] 1 2

[[2]]
[1] 3 4

[[3]]
[1] 5 6

[[4]]
[1] 7 8

[[5]]
[1]  9 10

[[6]]
[1] 11 12



More information about the R-help mailing list