Easiest way to do it is to try it out and time it. Here is a case
where I generated two sets of data with 120,000 characters each (just
random numbers converted to character strings) and then asked for the
intersection of them. Came up with 3 matched in about 0.2 seconds.
That would seem fastest
Hi,
Thanks for the feedback. I have tried it on the small size sample and ref
and it works. Now I want to use a larger dataset for myref (the reference
file) . The reference file contains 112189 rows. Can I use the same approach
that works for the small example? Or are there other alternatives whe
Here is one way to find the common rows. You can then use the 'keys'
gotten back to reconstruct a new data frame:
> f1 <- read.table(textConnection("V1 V2
+ YBL064C YBR067C
+ YBL064C YBR204C
+ YBL064C YDR368W
+ YBL064C YJL067W
+ YBL064C YPR160W
+ YBR053C YGL089C
+ YBR053C YHR113W
+ YBR053C Y
Hi,
I have a similar query (how to compare 2 datasets), but my dataset is a bit
different.
I want to compare each data in dataset 1 to data in dataset 2 and get the
data which is common to both datasets.
For example;
I have a a file (named mysample).
V1 V2
YBL064C YBR067C
YBL064C YBR204C
Y
<[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> I would like to compare two data sets saved as text files (example
> below) to determine if both sets are identical(or if dat2 is missing
> information that is included in dat1) and if they are not identical
> list what information is differe
Here is how to find the values in common:
> dat1 <- paste('a', 1:6, sep='')
> dat2 <- paste('a', c(2,4:6), sep='')
> # find the data in common
> intersect(dat1, dat2)
[1] "a2" "a4" "a5" "a6"
>
On 3/25/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I would like to compare two data sets saved
I would like to compare two data sets saved as text files (example below) to
determine if both sets are identical(or if dat2 is missing information that is
included in dat1) and if they are not identical list what information is
different between the two sets(ie output "a1", "a3" as the differin
7 matches
Mail list logo