Wrapper around base::seq()
that replaces the maximal end value with the supremum
and returns an empty vector if b <= a, in the style of Python's range()
.
Note that peruse::range
views end as a supremum, not a maximum, thus range(a,b)
is equivalent to the set [
a,b) when a < b or {}
when b >= a.
range(a, b, ...)
a | minimum |
---|---|
b | supremum |
... | other params passed to |
range(1,5)#> [1] 1 2 3 4range(9,10)#> [1] 9range(1,6, by = 2)#> [1] 1 3 5