I have a question about generating a dataframe out of another dataframe. The new dataframe contains the same information as the old dataframe but reported the data in an other way. The dataframe to start with, looks like this:
> a
Gene.Symbol miRNA
Nap1l1 mmu-let-7a
Napepld mmu-let-7b
Nat8l mmu-let-7b
Nceh1 mmu-let-7b
Ncoa3 mmu-let-7a
Ndst2 mmu-let-7a
Ndst3 mmu-let-7a
Nedd4l mmu-let-7a
Nedd4l mmu-let-7b
Nefm mmu-let-7a
Now i want to convert the dataframe to a dataframe like below.
>b mmu-let-7a mmu-let-7b
Nap1l1 1 0
Napepld 0 1
Nat8l 0 1
Nceh1 0 1
Ncoa3 1 0
Ndst2 1 0
Ndst3 1 0
Nedd4l 1 1
Nefm 1 0
Can anyone help me with this? Many thanks! Regards Lisanne