Populating values of each parameter of dataframe1 to another dataframe2 under same parameter field names
0
0
Entering edit mode
6.1 years ago

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
R next-gen alignment gene genome • 1.3k views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Yes, you are right !. Here, I have shared a dummy example which actually relates to NGS data.

ADD REPLY

Login before adding your answer.

Traffic: 2223 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6