mm: Matrix Multiplication

Description Usage Arguments Value Examples

View source: R/matrix_multiplication.R

Description

Multiplies two matricies. A wrapper around 'matmalt()' (i.e. ' 'data.frame's

Multiplies two matricies. A wrapper around 'matmalt()' (i.e. ' 'data.frame's

Usage

1
2
3
mm(x, y, return_matrix)

"%mm%"(x, y, return_matrix)

Arguments

x

A numeric matrix or vector

y

A numeric matrix or vector

return_matrix

Defaults to returning a data.frame (FALSE). Set to TRUE to return a matrix

Value

The matrix product as a data.frame or matrix

The matrix product as a data.frame or matrix

Examples

1
2
3
4
5
6
7
8
x <- data.frame(a=c(1,2,3), b=c(5,6,7))
y <- c(2,2)
mm(x, y)


x <- data.frame(a=c(1,2,3), b=c(5,6,7))
y <- c(2,2)
x %mm% y

mmr documentation built on Aug. 4, 2020, 5:08 p.m.

Related to mm in mmr...