Hello list, Thanks in advance for any help. I have many (approx 20) files that I have merged. For example d1<-read.csv("AlleleReport.csv") d2<-read.csv("AlleleReport.csv") m1 <- merge(d1, d2, by = c("IND", intersect(colnames(d1), colnames(d2))), all = TRUE) m2 <- merge(m1, d3, by = c("IND", intersect(colnames(m1), colnames(d3))), all = TRUE) [[alternative HTML version deleted]]
> Hello list, > > I am sorry for the previous half post. I accidentily hit send. Thanks > again in advance for any help. > > I have many (approx 20) files that I have merged. Each data set contains > rows for individuals and data in 2 - 5 columns (depending upon which data > set). The individuals in each data set are not necessarily the same and are > all duplicated (different data in columns) across sheets I am trying to > merge. I have used the merge function >For example> > d1<-read.csv("AlleleReport.csv") > d2<-read.csv("AlleleReport.csv") > > m1 <- merge(d1, d2, by = c("IND", intersect(colnames(d1), colnames(d2))), > all = TRUE) > m2 <- merge(m1, d3, by = c("IND", intersect(colnames(m1), colnames(d3))), > all = TRUE)My problem is that when the data is merged it looks something like Ind L1 L1.1 L2 L2.1 L3 L3.1 a 12 13 NA NA NA NA a NA NA 22 43 34 45 b 14 15 45 64 NA NA b NA NA NA NA 99 84 Is there a way that I can merge the rows for each individual? Cheers Grant> > > > > > > >[[alternative HTML version deleted]]