Skip to contents

Chainable functional alias of x[i] <- value.

Usage

setAt(x, i, value)

Arguments

x

An object to modify.

i

The index at which the value should be set.

value

The value to assign at the specified index.

Value

The modified object, with the value set at the specified index.

Examples

x <- c(1, 2, 3, 4, 5)
setAt(x, 2, 10)
#> [1]  1 10  3  4  5