Learn R Programming

bigalgebra (version 3.0.0)

dhprod: Element-wise (Hadamard) product

Description

Computes \(Z := X \circ Y\). When `Z` is missing it is allocated automatically.

Usage

dhprod(N = NULL, X, INCX = 1L, Y, INCY = 1L, Z, INCZ = 1L)

Value

The updated object `Z`.

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`.

Z

Optional output container receiving the product.

INCZ

Integer stride for `Z`.

Examples

Run this code
dhprod(X = 1:4, Y = rep(2, 4))

Run the code above in your browser using DataLab