Generate linearly spaced vector
stm_linspace.Rd
stm_linspace()
generates a vector of linearly spaced values from
from
to to
, with a specified number of points n
.
Arguments
- from
A numeric value representing the start of the sequence.
- to
A numeric value representing the end of the sequence.
- n
Optional. A positive integer specifying the number of points in the sequence. Default is 50.
- digits
Optional. An integer specifying the number of decimal places to round the result. Default is
NULL
.
Details
This function generates a sequence of values with equal spacing
between them, which is useful for creating plots or numerical grids.
If digits
is provided, the resulting vector will be rounded to
the specified number of decimal places.