Created
November 15, 2011 12:32
-
-
Save wakuteka/1366974 to your computer and use it in GitHub Desktop.
sweave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\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: | |
<<>>= | |
data(airquality) | |
library(stats) | |
kruskal.test(Ozone ~ Month , data = airquality) | |
@ | |
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} | |
<<fig=TRUE ,echo=FALSE >>= | |
boxplot(Ozone ~ Month, data = airquality) | |
@ | |
\end{center} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment