1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<!--
Use the following R command to sweave this file:
Sweave("example1.snw",driver=RweaveHTML())
!-->
<html>
<body>
<h1>Sweave Example 1 using a HTML file</h1>
<p align=center>
<font size=+1>
Eric Lecoute<br>
<Sexpr format(Sys.time(), "%b %d, %Y")>
</font>
<br>
Adapted from Friedrich Leisch example for LaTeX Sweave
</p>
<p> In this example we embed parts of the examples from the <font class="Rcmd">kruskal.test</font> from help page into a HTML document:</p>
<<echo=TRUE>>=
data(airquality)
library(ctest)
kruskal.test(Ozone ~ Month, data=airquality)
@
<p>which showns that the location parameter of the Ozone distribution varies significantly from month to month. Finally, we include a boxplot of the data:
<<echo=FALSE,fig=TRUE>>=
boxplot(Ozone ~ Month, data=airquality)
@
</body>
</html>
|