Example code for displaying a matrix (or table or dataframe) using a combination of

foo.Rnw.txt : a readable version of foo.Rnw.

foo.Rnw: The file you source in R

And then the resulting files . . .

foo.aux

foo.log

foo.pdf

foo.tex