Re: [R] Alternative method for range-matching within 2 nested loops in R?

2013-07-29 Thread William Dunlap
: [R] Alternative method for range-matching within 2 nested loops in R? Hi. I've been puzzling about how to replace the nested loops below. The idea is that the B dataframe has rows with a posix datetime and the C dataframes has posix Start and End times. I want to assign a value

[R] Alternative method for range-matching within 2 nested loops in R?

2013-07-27 Thread John Helly
Hi. I've been puzzling about how to replace the nested loops below. The idea is that the B dataframe has rows with a posix datetime and the C dataframes has posix Start and End times. I want to assign a value to the observations in B based in intersecting the appropriate time-interval in C.

Re: [R] Alternative method for range-matching within 2 nested loops in R?

2013-07-27 Thread Bert Gunter
Perhaps: ?findInterval (you may need to do some type conversion first) -- Bert On Sat, Jul 27, 2013 at 3:28 PM, John Helly hel...@ucsd.edu wrote: Hi. I've been puzzling about how to replace the nested loops below. The idea is that the B dataframe has rows with a posix datetime and the C