search for: fiall

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

Did you mean: fall
2024 Sep 17
1
findInterval
...rid(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 bins [5,10) and [10,15) fiAll <- apply(allFT, 1, function(r.a.f) do.call(findInterval, c(list(x, v), as.list(r.a.f)))) cbind(x, fiAll) # has all info ## must find cool 'column names' for fiAll: construct from r.., a.., l.. = F / T (cn1 <- apply(`dim<-`(c(".","|")[allFT+1L], dim(allFT))...
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)