Entering edit mode
6.7 years ago
sofie_carolina
▴
30
How to populate parameters values present in rows of one dataframe(df1) to dataframe(df2) under same parameter field in R?
Dataframe1 contain:
df1
Col1 Col2 Col3 Col4 Col5
A=5 C=1 E=5 F=4 G=2 --Row1
A=6 B=3 D=6 E=4 F=4 --Row2
B=2 C=3 D=3 E=3 F=7 --Row3
Dataframe2 contain one row with each parameters as field names: df2 = A B C D E F g .....'n'
Example Output (if values not found the null to be printed):
df2:
A B C D E F G
5 1 5 4 2
6 3 6 4 4
2 3 3 3 7
Maybe this question should be asked on stackoverflow, since it is not bioinformatics-related. As a general rule, people tend to help more if you show them what you tried, and the problems/errors you get.
Yes, you are right !. Here, I have shared a dummy example which actually relates to NGS data.