Create a range from the powers of mult
on the closed interval [lo
, hi
].
The endpoints are included, even if they are not multiples of mult
. The range
may go from negative to positive values if requested.
This function works on integer sequences, so if an interval is requested outside of
the maximum representable range of integers \([-(2^{31} - 1), 2^{31} - 1]\) it
will throw an error.
create_range_exp(lo, hi, mult = 8, exclude_zero = FALSE)
lo | bottom of the interval |
---|---|
hi | top of the interval |
mult | multiplier |
exclude_zero | include |
#> [1] 8 16 32 64 128 256 512 1024 2048 4096 8192