Possible Duplicate:
“unpacking” a factor list from a data.frame
If I have a data frame which has the same format as something like this
X geneA,geneB
Y geneD,geneF
Z geneH,geneL,geneS
I am trying to find a quick and effiecent way of expanding it so that I can split (by a comma) the second column and assign the corresponding value of the first column to give me something like this
X geneA
X geneB
Y geneD
Y geneF
Z geneH
Z geneL
Z geneS
Thanks in advanced!