Skip to contents

Generate a breaks vector of size n with linearly spaced breaks.

Usage

breaks_linear(n = 10)

Arguments

n

<int> the size of the output vector. Ouput size will be at least length-2 for finite input.

Details

If input range is non-finite, an empty vector is returned.

See also

Examples

breaks_linear(5)(-10:10)
#> [1] -10  -5   0   5  10
breaks_linear()(-1:1)
#>  [1] -1.0000000 -0.7777778 -0.5555556 -0.3333333 -0.1111111  0.1111111
#>  [7]  0.3333333  0.5555556  0.7777778  1.0000000