How to join data from 2 different csv-files in R?

后端 未结 2 1612
孤街浪徒
孤街浪徒 2021-01-07 02:57

I have the following problem: in a csv-file I have a column for species, one for transect, one for the year and one for the AUC. In another csv-file I have a column for tran

2条回答
  •  醉话见心
    2021-01-07 03:29

    Please use

    library(dplyr)
    
    df1<- read.csv("F:\\Test_Anything\\Merge\\1.csv" , head(T))
    df2<-read.csv("F:\\Test_Anything\\Merge\\2.csv" , head(T))
    r <- merge(df1,df2,by=c('NAME','NAME'),all.x=T)
    write.csv(r,"F:\\Test_Anything\\Merge\\DF.csv" , all(T) )
    

提交回复
热议问题