Hi:
I have a two large files (over 300K lines).
file 1:
NameX
UK 199
UK 230
UK 139
..
UAE194
UAE 94
File 2:
Name XY
UK140 180
UK195240
UK304340
I want to select X of File 1 and search if it falls in range of X and
Y of
On Mar 13, 2010, at 10:14 PM, Adrian Johnson wrote:
Hi:
I have a two large files (over 300K lines).
file 1:
NameX
UK 199
UK 230
UK 139
..
UAE194
UAE 94
File 2:
Name XY
UK140 180
UK195240
UK304340
I haven't figured
Try this:
file1 - read.table(textConnection(NameX
+ UK 199
+ UK 230
+ UK 139
+ UAE194
+ UAE 94), header=TRUE, as.is=TRUE)
file2 - read.table(textConnection(Name XY
+ UK140 180
+ UK195240
+ UK304340), header=TRUE, as.is=TRUE)
Hi David,
Sorry. I want to test those lines in file1 match name in file2.
IF File1$Name == File2$Name then:
check if File1$X is in range of File2$(x,y):
if yes:
print File1$Name '\t' File1$X '\t' File2$Name '\t'
File2$X '\t' File2$Y.
Thanks
Adrian
On
On Mar 13, 2010, at 11:38 PM, Adrian Johnson wrote:
Hi David,
Sorry. I want to test those lines in file1 match name in file2.
IF File1$Name == File2$Name then:
check if File1$X is in range of File2$(x,y):
Not an adequately specific bit os pseudo code.
if yes:
The example I gave was just an example, I made for illustrating my problem. I
IF File1$Name == File2$Name then:
check if File1$X is in range of File2$(x,y):
if yes:
print File1$Name '\t' File1$X '\t' File2$Name '\t'
File2$X '\t' File2$Y
if no :
If you also want to match on the Name, this should do it:
file1 - read.table(textConnection(NameX
+ UK 199
+ UK 230
+ UK 139
+ UAE194
+ UAE 94), header=TRUE, as.is=TRUE)
file2 - read.table(textConnection(Name XY
+ UK80 100
+ UK140 180
+ UK195
On Sat, 13 Mar 2010, Adrian Johnson wrote:
Hi:
I have a two large files (over 300K lines).
file 1:
NameX
UK 199
UK 230
UK 139
..
UAE194
UAE 94
File 2:
Name XY
UK140 180
UK195240
UK304340
I want to select X of File 1
Typo corrected below.
On Sat, 13 Mar 2010, Charles C. Berry wrote:
On Sat, 13 Mar 2010, Adrian Johnson wrote:
Hi:
I have a two large files (over 300K lines).
file 1:
NameX
UK 199
UK 230
UK 139
..
UAE194
UAE 94
File 2:
Name XY
UK
9 matches
Mail list logo