I am writing a document in Sweave and would like to echo R code chunks in the final PDF with code lines. However, I cannot seem to find line numbers as a chunk option. Does anyone know how to include code lines in chunk echos?
For example, how can I get the following chunk to include the 2 line numbers (1 and 2) when the chunk is echo'd into the pdf?
<<echo = T, eval = T>>=
amount <- 5
5 * amount
@