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
> -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
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
>
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
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
5 matches
Mail list logo