dset: Fill a vector or matrix with a constant value

View source: R/blas_extras.R

dsetR Documentation

Fill a vector or matrix with a constant value

Description

Fill a vector or matrix with a constant value

Usage

dset(N = NULL, ALPHA, X, INCX = 1L)

Arguments

N

Optional integer specifying the number of elements to modify. Defaults to the length of 'X'.

ALPHA

Numeric scalar used to populate 'X'.

X

Double-precision vector, matrix or ['bigmemory::big.matrix'] to be filled in place.

INCX

Integer stride between successive elements of 'X'.

Value

Invisibly returns 'X' after modification.

Examples

x <- matrix(0, 2, 3)
dset(ALPHA = 5, X = x)
x


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