
\documentclass[12pt]{article}
\usepackage{float,graphicx, geometry, amssymb, amsmath, amsfonts, verbatim, latexsym, natbib}
\usepackage{Sweave}
\bibpunct{(}{)}{;}{a}{,}{,}
\geometry{left=1.25in, right=1.25in, top=1in, bottom=1in}

\title{Sweave Demo}

\author{Houston Gilbert}

\begin{document}

\maketitle

This is my in class demo for the \texttt{Sweave()} package in \textsf{R}.

% latex table generated in R 2.4.0 by xtable 1.4-3 package
% Thu Feb 15 10:33:42 2007
\begin{table}[ht]
\begin{center}
\begin{tabular}{rrrrr}
  \hline
 & Sample 1 & Sample 2 & Sample 3 & Sample 4 \\
  \hline
1 & 0.756 & $-$0.594 & $-$0.446 & $-$0.579 \\
  2 & 0.684 & $-$0.163 & $-$0.748 & 0.337 \\
  3 & 0.411 & 1.022 & $-$1.474 & 0.244 \\
  4 & $-$0.568 & $-$0.708 & 0.506 & 0.626 \\
  5 & $-$0.016 & 1.412 & $-$0.685 & $-$1.475 \\
  6 & 0.601 & $-$2.610 & 1.661 & 0.901 \\
  7 & 0.358 & $-$0.296 & 0.517 & 1.541 \\
  8 & $-$1.602 & $-$0.496 & 0.016 & $-$0.696 \\
  9 & 0.520 & $-$0.466 & $-$0.316 & $-$1.256 \\
  10 & 0.955 & $-$0.445 & 0.396 & 0.206 \\
  \hline
  mean & 0.210 & $-$0.334 & $-$0.058 & $-$0.015 \\
   \hline
\end{tabular}
\caption{Samples of $n$=10 individuals from $N(0,1)$, together
with their respective means.}
\end{center}
\end{table}
From here, we can go on to put a figure into the document...

\begin{figure}
\begin{center}
\includegraphics{demo-FigureExample}
\caption{This is my histogram for the the mean of 1000 samples of 10 N(0,1) random
variables.}
\label{fig:hist}
\end{center}
\end{figure}

\end{document}
