The breaks_mode is designated to resemble cut.default, however, the right argument remains without effect in cut.integer for default breaks_mode and breaks as scalars as shown below. First, look at cut.default:
The second element of the output is first part of the first bin with right = TRUE, then part of the second bin with right = FALSE. As you stated in the documentation, the implementation of cut.integer does not consider the right argument in this case.
cut(1:4, 3, right = T)
[1] 1-2 1-2 3 4
Levels: 1-2 3 4
Since we name the breaks_mode "default", cut.integer needs to reproduce the underlying output (not the labels obviously) of cut.default.
The breaks_mode is designated to resemble
cut.default
, however, the right argument remains without effect incut.integer
for default breaks_mode and breaks as scalars as shown below. First, look atcut.default
:cut.default(1:4, 3, right = T) [1] (0.997,2] (0.997,2] (2,3] (3,4] Levels: (0.997,2] (2,3] (3,4]
cut.default(1:4, 3, right = F) [1] [0.997,2) [2,3) [3,4) [3,4) Levels: [0.997,2) [2,3) [3,4)
The second element of the output is first part of the first bin with
right = TRUE
, then part of the second bin withright = FALSE
. As you stated in the documentation, the implementation ofcut.integer
does not consider the right argument in this case.cut(1:4, 3, right = F) [1] 1-2 1-2 3 4 Levels: 1-2 3 4
cut(1:4, 3, right = T) [1] 1-2 1-2 3 4 Levels: 1-2 3 4 Since we name the
breaks_mode
"default",cut.integer
needs to reproduce the underlying output (not the labels obviously) ofcut.default
.