search for: argstf

Displaying 2 results from an estimated 2 matches for "argstf".

Did you mean: argstr
2024 Sep 17
1
findInterval
...different* results (and not both the same). I don't think 'nomatch' would improve the relatively clean findInterval() behavior. There are three logical switches ... which allow 2^3 variants of which I now guess only 6 differ: Here's some R code showing the possibilities: (argsTF <- names(formals(findInterval))[-(1:2)]) # "rightmost.closed" "all.inside" "left.open" FT <- c(FALSE, TRUE) allFT <- as.matrix(expand.grid(rightmost.closed = FT, all.inside = FT, left....
2024 Sep 16
1
findInterval
Suppose we have `dat` shown below and we want to find the the `y` value corresponding to the last value in `x` equal to the corresponding component of `seek` and we wish to return an output the same length as `seek` using `findInterval` to perform the search. This returns the correct result: dat <- data.frame(x = c(2, 2, 3, 4, 4, 4), y = c(37, 12, 19, 30, 6, 15), seek = 1:6)