0

I have looked at the various threads and sadly the answers provided are not working. I am merging two files. Both files have common column names. I want the two data sets to merge for the same time point, however when I use the command s3<-merge(s1,s2,all=TRUE), it gives me a file as follows:

screenshot of file

I would like the duplicate time points to be removed.

If I use s3<-merge(s1,s2,all.x=TRUE), then none of the data from s2 gets merged.

When reading the data file I am using s2<-read.csv('X.csv',stringsAsFactors=FALSE).

I don't know where I am going wrong.

Mihai Chelaru
  • 7,614
  • 14
  • 45
  • 51
v1983
  • 11
  • 1
  • 2
    Please edit your question to include [reproducible data and code](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Jan Boyer Nov 19 '18 at 19:14
  • How about ``merge(merge(df1, df2, by='id', all=T), df3, by='id', all=T)``? or use `cbind` method. – TechWizard Nov 20 '18 at 10:36
  • actually let me re phrase - so ultimately what i want is this - for the same ID, i want to time match different columns – v1983 Dec 13 '18 at 19:28

0 Answers0