所以,我想将两列合并为一。这就是我的数据的样子:
> tbl_end
Sequence modifications no_Ks no_Ks_modif V1
AAAAGAAAVANQGKK [14] Acetyl (K)|[15] Acetyl (K) 2 2 [14] Acetyl
AAAAGAAAVANQGKK [14] Acetyl (K)|[15] Acetyl (K) 2 2 [14] Acetyl
AAFTKLDQVWGSE [5] Acetyl (K) 1 1 [5] Acetyl
AAIKFIKFINPKINDGE [4] Acetyl (K)|[7] Acetyl (K)|[12] Acetyl (K) 3 3 [4] Acetyl
AAIKFIKFINPKINDGE [4] Acetyl (K)|[7] Acetyl (K)|[12] Acetyl (K) 3 3 [4] Acetyl
我想在不干扰其他数据集的情况下合并列序列和修改。
新列的名称可能是“Seq_modif”
试图用粘贴来做,但这不是我想要的:
tbl_reo2 <- paste(tbl_end$Sequence,tbl_end$modifications)
所以这就是我想通过脚本实现的目标:
Seq_modif no_Ks no_Ks_modif V1
AAAAGAAAVANQGKK [14] Acetyl (K)|[15] Acetyl (K) 2 2 [14] Acetyl
AAAAGAAAVANQGKK [14] Acetyl (K)|[15] Acetyl (K) 2 2 [14] Acetyl
AAFTKLDQVWGSE [5] Acetyl (K) 1 1 [5] Acetyl
AAIKFIKFINPKINDGE [4] Acetyl (K)|[7] Acetyl (K)|[12] Acetyl (K) 3 3 [4] Acetyl
AAIKFIKFINPKINDGE [4] Acetyl (K)|[7] Acetyl (K)|[12] Acetyl (K) 3 3 [4] Acetyl