[R] Simple list manipulation question

Wolski wolski at molgen.mpg.de
Fri May 28 14:52:59 CEST 2004


Hallo!
x<-unlist(yourlist)
names(x)  # maybee you have to postprocess the names a little
dataframe(names(x),x)

Sincerely
Eryk

*********** REPLY SEPARATOR  ***********

On 5/28/2004 at 8:49 AM Sean Davis wrote:

>I have a list of vectors
>
>$A
>"AB" "BC" "CD"
>
>$B
>"GF" "HG" "FH" "FJ"
>
>and I want to convert it into a dataframe of form
>
>A  AB
>A  BC
>A  CD
>B  GF
>B  HG
>B  FH
>B  FJ
>
>Just can't quite come up with a nice "R" solution for it.
>
>Thanks,
>Sean
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



Dipl. bio-chem. Eryk Witold Wolski    @    MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin       'v'    
tel: 0049-30-83875219               /   \    
mail: wolski at molgen.mpg.de        ---W-W----    http://www.molgen.mpg.de/~wolski




More information about the R-help mailing list