TRUE if the values should rather increment than overwrite at the target positions, see readwrite.ff
pack
FALSE to prevent rle-packing in hybrid index preprocessing, see as.hi
Value
Values at the target positions.
More precisely swap(x, value, i, add=FALSE) returns the old values at the position i while swap(x, value, i, add=TRUE) returns the incremented values of x.
Details
y <- swap(x, value, i, add=FALSE, ...)
is a shorter and more efficient version of
y <- x[i, add=FALSE, ...]
x[i, add=FALSE, ...] <- value
and
y <- swap(x, value, i, add=TRUE, ...)
is a shorter and more efficient version of
y <- x[i, add=TRUE, ...]
y <- y + value
x[i, add=FALSE, ...] <- y