Rev 76137 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\documentclass[a4paper]{article}\title{Simple Sweave Example}\author{Friedrich Leisch, Vincent Goulet and R Core Team}\begin{document}\maketitleIn this simple example we embed parts of the examples from the\texttt{kruskal.test} help page into a \LaTeX{} document:<<>>=data(airquality, package="datasets")library("stats")kruskal.test(Ozone ~ Month, data = airquality)@The location parameter of the Ozone distribution variessignificantly from month to month. We include a boxplot of thedata with the following code:%% want an eval=FALSE case and referencing a previous chunk:<<boxp, eval=FALSE>>=boxplot(Ozone ~ Month, data = airquality)@The resulting plot is displayed below.\begin{center}<<fig=TRUE, echo=FALSE>>=library("graphics")<<boxp>>@\end{center}\end{document}