?merge Here is what you would do:
x1 <- read.table('/tmp/list1.txt', header=TRUE, sep='\t', as.is=TRUE) x2 <- read.table('/tmp/list2.txt', header=TRUE, sep='\t', as.is=TRUE) combined <- merge(x1, x2, by.x="Probe.Id", by.y="Probe.ID") Unfortunately your data did not have any IDs in common between the two files. On Tue, May 11, 2010 at 6:36 AM, Assa Yeroslaviz <fry...@gmail.com> wrote: > Hello, > > I have two tab-delimited files which I would like to combine. > In the first one I have gene IDs (Unique) on column 1 and than various > experimental results from microarray analysis (see attached files list1 ) > > the second arrays have the same genes IDs (more and in a different order, > some are double) (see attached files list2 ) > > What I would like to do is to search in the second list for gene ID of the > first list, than copy (add) the annotations (all or some) into the matrix > list of the first list. > > Unfortunately I don't have a clue as how to start doing it. I tried to read > both lists into a matrix with read.table(). but I don't know how to > continue. > > I would be happy for any help I can get. > > THX > > Assa > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.