
Convenience function for the internal Slice R6 class constructor with zero-based indexing and exclusive stop index.
Source:R/slicing.R
zb_slice.RdConvenience function for the internal Slice R6 class constructor with zero-based indexing and exclusive stop index.
Examples
# Equivalent to Python's arr[5:0:-1]
zb_slice(5, 0, -1)
#> <Slice>
#> Public:
#> clone: function (deep = FALSE)
#> indices: function (length_param)
#> initialize: function (start, stop = NA, step = NA)
#> start: 5
#> step: -1
#> stop: 0
# Equivalent to Python's arr[-1::-1] (full reverse)
zb_slice(-1, NA, -1)
#> <Slice>
#> Public:
#> clone: function (deep = FALSE)
#> indices: function (length_param)
#> initialize: function (start, stop = NA, step = NA)
#> start: -1
#> step: -1
#> stop: NA