powered by
Multiplies a numeric matrix A by a scalar weight w, returning \(w * A\). The input must be a base R numeric matrix (or convertible to one).
A
w
bdScalarwproduct(A, w)
A numeric matrix with the same dimensions as A.
Numeric matrix (or object convertible to a dense numeric matrix).
Numeric scalar weight.
set.seed(1234) n <- 5; p <- 3 X <- matrix(rnorm(n * p), n, p) w <- 0.75 bdScalarwproduct(X, w)
Run the code above in your browser using DataLab