Re: [R] sqldf merging with subset in specific range

2012-12-26 Thread jim holtman
Is this what you want: > m <- read.table(text = "10 + 15 + 36 + 37 + 38 + 44 + 45 + 57 + 61 + 62 + 69 ") > n <- read.table(text = "30 38 + 52 62 ") > > require(sqldf) > sqldf("select m.V1 + from m, n + where m.V1 between n.V1 and n.V2 + ") V1 1 36 2 37 3 38 4 57 5 61 6 62 >

[R] sqldf merging with subset in specific range

2012-12-26 Thread Matthew Liebers
Hi all: I have two data sets. Set A includes a long list of hits in a single column, say: m$V1 10 15 36 37 38 44 45 57 61 62 69 ...and so on Set B includes just a few key ranges set up by way of a minimum in column X and a maximum in column Y. Say, n$X n$Y 30 38 # range from 30 to 38 52 6