\documentclass[english, a4paper, 10pt, headings=small, DIV11]{scrartcl}
\begin{document}
\SweaveOpts{keep.source = FALSE}\verb+\SweaveOpts{keep.source = FALSE}+
<<test>>=
1
@
line 7 
line 8 
line 9 
\SweaveOpts{keep.source = TRUE}\verb+\SweaveOpts{keep.source = TRUE}+
<<test2>>=
2
@
line 14 
line 15 
line 16  
\SweaveOpts{keep.source = FALSE}\verb+\SweaveOpts{keep.source = FALSE}+
<<test3>>=
3
@
line 21 
line 22
line 23 chunk option keep.source = TRUE
<<test4, keep.source = TRUE>>=
4
@
line 27
line 28
line 29
<<test5>>=
5
@
line 33
line 34
line 35
line 36
line 37
line 38
line 39
line 40
line 41
line 42\verb+SweaveInput+
\SweaveInput{vignettes.defs}
<<test11>>=
11
@
line 47 
line 48 
line 49 
\SweaveOpts{keep.source = TRUE}\verb+\SweaveOpts{keep.source = TRUE}+
<<test12>>=
12
@
line 54 
line 55 
line 56 
\SweaveOpts{keep.source = FALSE}\verb+\SweaveOpts{keep.source = FALSE}+
<<test13>>=
13
@
line 61 
line 62
line 63 chunk option keep.source = TRUE
<<test14, keep.source = TRUE>>=
14
@
line 67
line 68
line 69
<<test15>>=
15
@
line 73
line 74
line 75
line 76
\end{document}