Title: | Matrix Multiplication on Data.frames |
---|---|
Description: | Simple helpers for matrix multiplication on data.frames. These allow for more concise code during low level mathematical operations, and help ensure code is more easily read, understood, and serviced. |
Authors: | Steve Condylios [aut, cre, cph] |
Maintainer: | Steve Condylios <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-05 05:12:17 UTC |
Source: | https://github.com/stevecondylios/mmr |
Multiplies two matricies. A wrapper around 'matmalt()' (i.e. ' 'data.frame's
Multiplies two matricies. A wrapper around 'matmalt()' (i.e. ' 'data.frame's
mm(x, y, return_matrix) "%mm%"(x, y, return_matrix)
mm(x, y, return_matrix) "%mm%"(x, y, return_matrix)
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 |
The matrix product as a data.frame or matrix
The matrix product as a data.frame or matrix
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
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