I am having a confusing example, can someone explain me the below code.
Create a list of data for test.
x <- c(0, 0.01, 0.5, 0.99, 1)
b <- c(0, 0, 1, 1)
Here comes the confusion.
.bincode(x, b, FALSE)
It returns with 2 2 2 2 NA.
But according to the usage, .bincode(x, breaks, right = TRUE, include.lowest = FALSE), .bincode(x, b, FALSE) equals to .bincode(x, b, right = FALSE, include.lowest = FALSE), which means the x should be mapped into NA, 2, 2, 2, 3.