Type: | Package |
Title: | Matrix Multiplication on Data.frames |
Version: | 0.1.0 |
Author: | Steve Condylios [aut, cre, cph] (<https://orcid.org/0000-0003-0599-844X>) |
Maintainer: | Steve Condylios <steve.condylios@gmail.com> |
BugReports: | https://github.com/stevecondylios/mmr/issues |
License: | MIT + file LICENSE |
URL: | https://github.com/stevecondylios/mmr |
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. |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2020-07-30 09:07:03 UTC; st |
Repository: | CRAN |
Date/Publication: | 2020-08-04 09:20:02 UTC |
Matrix Multiplication
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
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
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