我有两个数据框:
start<- data.frame(gene=c("A","A","A","B","B"), isoform=c("A.1","A.1","A.1","B.1","B.1"), exon=c("1","2","3","1","2"))
replace<-data.frame(isoform=c("A.1","B.1"),gene=c("C","D"))
我想将df1中的基因条目与df2中与同种型匹配的基因条目互换 即以
结尾result<-data.frame(gene=c("C","C","C","D","D"), isoform=c("A.1","A.1","A.1","B.1","B.1"), exon=c("1","2","3","1","2"))