I have a data frame with multiple columns as follows:
Frequency Alels
0.5 C
0.6 C,G
0.02 A,T,TTT
And I want to split the value of second column and the new rows have frequency = 0
.
I'm trying with separate()
from tidyr package but I can't change the frequency
column in new rows and I get the above results:
Frequency Alels
0.5 C
0.6 C
0.6 G
0.02 A
0.02 T
0.02 TTT
But I want the output as follows:
Frequency Alels
0.5 C
0.6 C
0 G
0.02 A
0 T
0 TTT
I'm trying with separate()
from tidyr package but I can't change the frequency
column in new rows.