| slide | R Documentation |
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.
slide(from, to, step = 1, before = 0, after = 0)
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. |
A data.table with three columns:
start: Start position of each window
center: Center position of each window
end: End position of each window
# Create sliding windows with step size 2 and window size 3
slide(1, 10, step = 2, before = 1, after = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.