Tools to combine R matrices and LaTeX code for use with knitr or sweave