Skip to content
Prev 366008 / 398502 Next

Assign a list to one column of data frame

Use list indexing, "[[" not "[" .
a b          new
1 1 a 1, 2, 3,....
2 2 b          foo
3 3 c 0.248115....
[[1]]
[1] 1 2 3 4 5

$g
[1] "foo"

$abb
          [,1]      [,2]
[1,] 0.2481156 0.2138564
[2,] 0.8598658 0.2898058
[3,] 0.5854885 0.4084578


Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sun, Dec 11, 2016 at 3:54 AM, Marlin JL.M <marlin- at gmx.cn> wrote: