Dear R-helpers, 
Lists in R are stumbling block for me.

I kindly ask you to help me able to write a
data-frame. 

I have a list of lists. 

> sls[1:2]
$Andromeda_maya1
       x   y
[1,] 369 103
[2,] 382 265
[3,] 317 471
[4,] 169 465
[5,] 577 333

$Andromeda_maya2
        x   y
 [1,] 173 507
 [2,] 540 395
 [3,] 268 143
 [4,] 346 175
 [5,] 489  91
 
I want to be able to write a data.frame like the
following:
X   Y     Name
369 103  Andromeda_maya1
382 265  Andromeda_maya1
317 471  Andromeda_maya1
169 465  Andromeda_maya1
577 333  Andromeda_maya1
173 507  Andromeda_maya2
540 395  Andromeda_maya2
268 143  Andromeda_maya2
346 175  Andromeda_maya2
489  91  Andromeda_maya2

Is there a way to convert this list-of-list into a
data.frame.

Thanks
srini

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to