\documentclass[a4paper]{article} \title{Sweave Example 1} \author{Friedrich Leisch} \begin{document} \maketitle In this example we embed parts of the examples from the \texttt{kruskal.test} help page into a \LaTeX{} document: \begin{Scode}{} data(airquality, package="datasets") library("stats") kruskal.test(Ozone ~ Month, data = airquality) \end{Scode} which shows that the location parameter of the Ozone distribution varies significantly from month to month. Finally we include a boxplot of the data: \begin{center} \begin{Scode}{fig=TRUE,echo=FALSE} library("graphics") boxplot(Ozone ~ Month, data = airquality) \end{Scode} \end{center} \end{document}