I'm just starting in R, and this probably is really simple, but here we go: I'm merging 2 csv files with the same number of rows by a common column "IID". The number of rows for each of the csv files is 566. When I perform the merge, this amounts to 568. Why is that? Is there anything being double counted?
data1<-read.csv("lala1.csv", head=T,sep=",")
data2<-read.csv("lala2.csv", head=T,sep=",")
dataMerge<-merge(data1,data2,by="IID")
write.csv(dataMerge, "lala_All_.csv")
data1
. FID IID T1
1 1 26014 0.004755930
2 1 31935 0.006217750
3 2 27841 0.005631550
4 2 32400 0.004967280
5 3 28814 0.005395390
6 3 33276 0.005683260
7 4 29445 0.005079630
8 5 28593 0.004365470
9 5 29851 0.005743720
10 6 29852 0.004015790
11 6 31820 0.005455630
12 7 33386 0.005741080
13 7 37065 0.006015120
14 8 33475 0.004334330
15 8 38487 0.004427610
16 9 34157 0.004991320
17 9 39281 0.005380730
18 10 36963 0.005759670
19 10 39673 0.003827710
20 11 36964 0.006559190
data2
. FID IID T2
1 1 26014 0.009336160
2 1 31935 0.011135400
3 2 27841 0.010364200
4 2 32400 0.009077190
5 3 28814 0.009483640
6 3 33276 0.009537670
7 4 29445 0.009054180
8 5 28593 0.008029250
9 5 29851 0.010172700
10 6 29852 0.006687910
11 6 31820 0.009435050
12 7 33386 0.010146600
13 7 37065 0.010533700
14 8 33475 0.007430050
15 8 38487 0.008475400
16 9 34157 0.008564570
17 9 39281 0.009678990
18 10 36963 0.010390400
19 10 39673 0.006431420
20 11 36964 0.011702000