I have a vector (e.g. letters
) that I want to incorporate into my .Rnw
knitr document as an itemized list. How do I do this?
I have tried \Sexpr{letters}
but it merely places commas between each:
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
Something like this is just as unhelpful:
\begin{itemize}
\item[\Sexpr{letters}]
\end{itemize}
What is the proper way to do this?
I'm looking for a result like:
etc.
Or
\documentclass{article}
\begin{document}
Here is a list.
\begin{itemize}
<<results="asis", echo=FALSE>>=
cat(sprintf('\\item{%s}', letters[1:5]), sep = '\n')
@
\end{itemize}
That was a list.
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With