Re: [R] removing data based on date pairs in a separate data frame

2016-02-29 Thread William Dunlap via R-help
If your start/end pairs are not overlapping you can use findInterval() to do this pretty quickly. E.g., isInABound <- function (x, low, high) { stopifnot(length(low) == length(high)) bounds <- rep(low, each = 2) bounds[seq(2, length(bounds), by = 2)] <- high stopifnot(!is.unsorted(

Re: [R] removing data based on date pairs in a separate data frame

2016-02-29 Thread Bert Gunter
What is the format of your date columns? -- character, factor, POSIXxx,... ?? See ?str to find out. (Reply to the list, not just me; others are far more facile at dates than I am). Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking th