rmm: Multiply the rows of a matrix by the corresponding elements...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/r-utility-rowcolmult.R

Description

This function performs row-wise matrix by vector multiplication, multiplying the rows of a matrix by the corresponding elements of a vector. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.

Usage

1
rmm(m, v)

Arguments

m

a numeric matrix

v

a numeric vector

Details

For each row of m the element-wise multiplication by v is performed, assuming length(v)==ncol(m).

Value

A matrix of the same dimensions as m, with each row obtained by multiplying the corresponding row of m by v.

Author(s)

Pawel Cichosz <p.cichosz@elka.pw.edu.pl>

See Also

cmm

Examples

1
2
rmm(matrix(1:9, nrow=3), 10^(0:2))
rmm(matrix(1:12, nrow=4), 10^(0:3))

42n4/dmr.util documentation built on May 20, 2019, 2:02 p.m.