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(
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
Dear R users,
I have two data frames.
The first contains a date/time column and the concentration of a species:
head(mydata)
datespecies
1 2016-01-31 23:59:53 -559.17
2 2016-02-01 00:00:53 -556.68
3 2016-
3 matches
Mail list logo