Skip to content
Prev 140566 / 398506 Next

list as object in dataframe

df$x is list so you have to use this type of assignment
y    x
1 1 a, b
2 1 f, c
3 1    a
y            x
1 1         a, b
2 1         f, c
3 1 a, b, c,....
'data.frame':   3 obs. of  2 variables:
 $ y: num  1 1 1
 $ x:List of 3
  ..$ : chr  "a" "b"
  ..$ : chr  "f" "c"
  ..$ : chr  "a" "b" "c" "d" ...
  ..- attr(*, "class")= chr "AsIs"

        
On Thu, Mar 27, 2008 at 4:27 PM, Daniel E. Bunker <deb37 at columbia.edu> wrote: