dsub: In-place vector subtraction

View source: R/blas_extras.R

dsubR Documentation

In-place vector subtraction

Description

Updates 'Y' by subtracting 'X', i.e. Y := Y - X.

Usage

dsub(N = NULL, X, INCX = 1L, Y, INCY = 1L)

Arguments

N

Optional integer giving the number of elements. Defaults to 'length(X)'.

X

Double-precision vector, matrix or ['bigmemory::big.matrix'] input.

INCX

Integer stride for traversing 'X'.

Y

Double-precision object updated in place.

INCY

Integer stride for traversing 'Y'.

Value

Invisibly returns the modified 'Y'.

Examples

x <- 1:4
y <- rep(10, 4)
dsub(X = x, Y = y)
y


bigalgebra documentation built on Sept. 9, 2026, 5:12 p.m.