slide creates a data.table defining sliding window positions for
analyzing sequences or data along a continuous range. This function provides
the foundation for positional analyses of codon usage patterns within genes.
Usage
slide(from, to, step = 1, before = 0, after = 0)
Value
A data.table with three columns:
start: Start position of each window
center: Center position of each window
end: End position of each window
Arguments
from
Integer specifying the start position of the analysis range.
to
Integer specifying the end position of the analysis range.
step
Integer specifying the step size between consecutive window centers
(default: 1). Larger values create non-overlapping or less overlapping windows.
before
Integer specifying the number of positions to include before
the window center (default: 0). Determines the left boundary of each window.
after
Integer specifying the number of positions to include after
the window center (default: 0). Determines the right boundary of each window.