Linked Questions

8 votes
2 answers
9k views

R dplyr join on range of dates [duplicate]

I want to join two tables xxx and yyy using a composite unique key and date ranges. In sql I would simply specify in the join but I cannot get dplyr to work. Is this possible? test<- inner_join(...
J. Doe.'s user avatar
  • 1,305
8 votes
3 answers
358 views

R - more effective left_join [duplicate]

I have got two dataframes - one containing names and ranges of limits (only few hundreds of rows, 1000 at most), which needs to be assigned to a "measurements" dataframe which can consist of ...
Petrik's user avatar
  • 827
4 votes
4 answers
14k views

Checking if value in vector is in range of values in different length vector [duplicate]

So I'm working in R and have a large dataframe that contains a vector that has genome positions like such: 2655180 2657176 2658869 And a second dataframe that has a a range of positions and a gene ...
wiestyfbaby's user avatar
2 votes
0 answers
2k views

Merging Overlapping Intervals in R [duplicate]

I have a problem where I get information on the range of occupied cells. There may be multiple start and end entries of the range which can overlap for the same test. Not all the "test" have entries. ...
Tony Hellmuth's user avatar
3 votes
0 answers
569 views

Merge a data.table with ranges (intervals) with another with single values [duplicate]

I have two data.tables, one with a range and one with a value: x = data.table(start = c(5,31,22,16), end = c(8,50,25,18)) y = data.table(val = c(40, 17, 7, 23)) x # start end #1: 5 8 #2: ...
Henk's user avatar
  • 3,656
0 votes
2 answers
200 views

How to match rows within in a range of another dataset [duplicate]

I have a genetic dataset where I am matching chromosome positions in the genome of 1 file if they fit within chromosome position ranges given in another file. There are similar questions to this that ...
DN1's user avatar
  • 266
0 votes
0 answers
323 views

How to merge two dataframes in R based on two conditions, matching column and within a range? [duplicate]

I have two dataframes: df1: name start end prop NC12 0 15000 62.62667 NC12 100 15100 62.62667 NC14 0 15000 62.66000 NC14 100 15100 62.62000 ...
msakya's user avatar
  • 9,561
2 votes
1 answer
137 views

R: Subset a data table based on the other one [duplicate]

Say I have two data table dm and dn: library(data.table) set.seed(12) dates = seq.Date(as.Date('2015-09-01'),as.Date('2015-11-01'), 2) dm = data.table(user=sample(LETTERS[1:4], 10, replace=T), ...
Francis's user avatar
  • 6,626
0 votes
1 answer
232 views

non-equi join in dplyr [duplicate]

I use dplyr as a lot in my code and frequently have to accomplish non-equi left join on dates. I want to do it using tidy syntax and pipes. I saw a package named fuzzyjoin which accomplish this, ...
Imtiaz's user avatar
  • 137
0 votes
2 answers
178 views

Issues using which in R for loop [duplicate]

I have two dataframes. The first dataframe is a list of genetic variants, their identifiers, and their position on a chromosome. The second is a list of genes where columns in each row specify the ...
avari's user avatar
  • 105
0 votes
2 answers
69 views

Finding corresponding row in a dataframe based on the value falling within a range columnA:columnB [duplicate]

I have a data.frame and a vector like: df = data.frame(id = 1:3, start = c(1, 1000, 16000), end = c(100, 1100, 16100), info = c("a", "b", "c")) ...
Adam Waring's user avatar
  • 1,218
1 vote
2 answers
97 views

In R how to merge two dataframe according same variable and the restriction of date period [duplicate]

How to combine [table_a] and [table_b] as below ? The wished result as [table_c] the Restrictions are: table_a$category=table_b$category and table_a$date %in% range(start_date,end_date) Anyone can ...
anderwyang's user avatar
  • 2,107
0 votes
2 answers
149 views

any recommend for finding the intersection of two continuous variable in r [duplicate]

How can I find the intersection percentages of some continuous variables, see the example below, please? d1<-data.frame(Start=c(10, 8, 6, 4 ), End=c(14, 12, 9,17 )) I want to check each row of the ...
Melih Aras's user avatar
0 votes
1 answer
118 views

Merge dataframes using "between" [duplicate]

I have the following two dataframes: df1: column_01 column_02 a 3 b 7 df2: column_01 column_02 column_03 column_04 a 1 4 a-low a 5 8 a-...
Kasper's user avatar
  • 3
0 votes
2 answers
52 views

Is there an R function for finding common between two files according to two numeric columns with a range of differences? [duplicate]

I have two big data with start and end positions and I want to find the common between them according to these positions. But I do not want just find rows that are exactly similar in positions. for ...
mehdi heidari's user avatar

15 30 50 per page
1
2 3 4 5
7