gpt4 book ai didi

r - 如何基于公共(public)列合并多个数据框

转载 作者:行者123 更新时间:2023-12-04 02:17:33 25 4
gpt4 key购买 nike

<分区>

我有三个数据框,我想按公共(public)列名(基因)合并所有三个数据集

dt1 <- read.table(header = TRUE, text = "Gene chr log
Sall3 5 -1.5
TRIM5 5 -3.4
PDIA5 2 -2.3
Nfatc1 2 -3.5", stringsAsFactors = FALSE)

dt2 <- read.table(header = TRUE, text = "Gene chr log
Sall3 5 -1.5
TRIM5 5 -3.4
PDIA5 2 -2.3
DCC 2 -0.4",stringsAsFactors = FALSE)

dt3 <- read.table(header = TRUE, text = "Gene chr log
Sall3 5 -1.5
TRIM5 5 -3.4
Ctdp1 2 -2.3,
Nfatc1 2 -4.5", stringsAsFactors = FALSE)

预期输出

dfinal <- read.table(header = TRUE, text = "Gene       chr log
Sall3 5 -1.5
TRIM5 5 -3.4", stringsAsFactors = FALSE)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com