shift_drawdown: Shift a drawdown cyclically

View source: R/compare.R

shift_drawdownR Documentation

Shift a drawdown cyclically

Description

Output cell (i,j) takes input cell (i + row_shift,j + col_shift), with indices wrapped around the matrix. Positive shifts move data up/left.

Usage

shift_drawdown(x, row_shift = 0, col_shift = 0)

Arguments

x

A binary drawdown.

row_shift, col_shift

Finite integer offsets; negative offsets allowed.

Value

An integer matrix of the original dimensions.

Examples

shift_drawdown(matrix(c(1, 0, 0, 0), 2), 1, 0)

weaveCompare documentation built on Nov. 9, 2026, 1:10 a.m.