head(merge1agg, n=10)
geneWB gene sample tpm
1 WBGene00000001 aap-1 1_EV_Con_3h 53.897797
2 WBGene00000001 aap-1 2_EV_Con_3h 55.815907
3 WBGene00000001 aap-1 3_EV_Con_3h 57.567861
4 WBGene00000001 aap-1 5_EV_NaCl_3h 58.090733
5 WBGene00000001 aap-1 6_EV_NaCl_3h 57.004453
6 WBGene00000001 aap-1 7_EV_NaCl_3h 59.762026
7 WBGene00000002 aat-1 1_EV_Con_3h 3.468561
8 WBGene00000002 aat-1 2_EV_Con_3h 3.692563
9 WBGene00000002 aat-1 3_EV_Con_3h 3.754730
10 WBGene00000002 aat-1 5_EV_NaCl_3h 4.800149
我正在尝试使用此命令gsub
test <- gsub("1_EV_Con_3h", "EV_Con_3h", merge1agg)
它似乎有用,但'test'最终会出现'values'并且会丢失'merge1agg'中的格式。我该怎么做但保留数据框?
谢谢,