Re: [R] fetching columns from another file

2010-01-24 Thread Dennis Murphy
Hi: The use of %in% may be more what you want. Consider the following (data faked because your data set could not be conveniently read into R...and Bill Dunlap is right, why would you want these to be matrices? But I digress...): # Generate gene names gene1 <- paste(c(3884, 3491, 3709, 3371, 3594

Re: [R] fetching columns from another file

2010-01-24 Thread William Dunlap
> -Original Message- > From: Amit [mailto:amitkumartiw...@gmail.com] > Sent: Sunday, January 24, 2010 11:23 AM > To: William Dunlap > Cc: r-help@r-project.org > Subject: Re: [R] fetching columns from another file > > I do not want to merge these data frames. But

Re: [R] fetching columns from another file

2010-01-24 Thread Amit
e sense to leave the dataset as > a data.frame (which read.table produces). > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > >> -Original Message- >> From: r-help-boun...@r-project.org >> [mailto:r-help-boun...@r-project.org] On Behalf Of Amit >

Re: [R] fetching columns from another file

2010-01-24 Thread William Dunlap
Sent: Sunday, January 24, 2010 10:48 AM > To: r-help@r-project.org > Subject: [R] fetching columns from another file > > Hi! All, > > I am trying to fetch rows from a data frame which matches to first 2 > columns of another data frame. Here is the example what I am trying to > d

[R] fetching columns from another file

2010-01-24 Thread Amit
Hi! All, I am trying to fetch rows from a data frame which matches to first 2 columns of another data frame. Here is the example what I am trying to do: > ptable=read.table(file="All.txt",header=T,sep="\t") > ptable=as.matrix(ptable) > dim(ptable) [1] 92756 > head(ptable) Gene1 Gene