I am providing a very simple example here. In my dataset, I have 50+ names in column. I get annoyed by the fact that colnames() output takes 50+ lines too! Is it possible to divide the output over multiple columns? Just by using some simple parameters to add to chunk. So my pdf documents are shorter.
\documentclass{article}
\begin{document}
<<>>=
library(ggplot2)
colnames(diamonds)
@
\end{document}
Sample Output
"carat"
"cut"
"color"
"clarity"
"depth"
"table"
"price"
"x"
"y"
"z"