search for: allft

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

Did you mean: all_t
2024 Sep 17
1
findInterval
...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.open = FT)) allFT (cn <- substr(colnames(allFT), 1,1)) # "r" "a" "l" x <- 2:18 v <- c(5, 10, 15) # create two...
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)