The R package matsbyname enables matrix mathematics wherein operations are performed “by name” and row and column types are allowed.


You can install matsbyname from CRAN with:


You can install a recent development version of matsbyname from github with:

# install devtools if not already installed
# install.packages("devtools")
# To build vignettes locally, use
devtools::install_github("MatthewHeun/matsbyname", build_vignettes = TRUE)


The functions in this package were used in Heun et al. (2018).

More Information

Find more information, including vignettes and function documentation, at


Heun, Matthew Kuperus, Anne Owen, and Paul E. Brockway. 2018. “A Physical Supply-Use Table Framework for Energy Analysis on the Energy Conversion Chain.” Applied Energy 226 (September): 1134–62.