Skip to contents

Nudge columns of a matrix by fixed amounts

Usage

nudger(x, nudge)

Arguments

x

a matrix

nudge

a single value or a vector with length equal to the number of columns in x

Value

matrix

Examples

nudger(matrix(0, nrow = 2, ncol = 2), nudge = c(0,1))
#>      [,1] [,2]
#> [1,]    0    1
#> [2,]    0    1